/** * Test constructor and getters * * @dataProvider constructorAndGettersDataProvider */ public function testConstructorAndGetters($method, $key, $expectedValue) { $this->builderMock->expects($this->once())->method('getData')->will($this->returnValue([$key => $expectedValue])); $attributeMetadata = new AttributeMetadata($this->builderMock); $this->assertEquals($expectedValue, $attributeMetadata->{$method}()); }