123', ], [ ListType::AND, [ new ScalarParam( ParamType::NUM, 5 ), new MessageValue( 'key' ) ], '5', ], ]; } /** @dataProvider provideConstruct */ public function testConstruct( $type, $values, $expected ) { $mp = new ListParam( $type, $values ); $expectValues = []; foreach ( $values as $v ) { $expectValues[] = $v instanceof MessageParam ? $v : new ScalarParam( ParamType::TEXT, $v ); } $this->assertSame( ParamType::LIST, $mp->getType() ); $this->assertSame( $type, $mp->getListType() ); $this->assertEquals( $expectValues, $mp->getValue() ); $this->assertSame( $expected, $mp->dump() ); } }