/** @dataProvider properties */
 public function testStringTypeIsReturnedWhenStringIsTheValue($propertyValue, $propertyType)
 {
     $foo = Foo::box(['name' => $propertyValue]);
     $propertyTypeExtractor = new PropertyTypeExtractor($foo);
     $propertyTypeExtractor->setPropertyName('name');
     $this->assertEquals($propertyType, $propertyTypeExtractor->execute());
 }
Ejemplo n.º 2
0
 public function testResourcesComposition()
 {
     $composition = ComposedResource::box(['credentials' => Foo::box(['name' => 'Sam'])]);
     $this->assertEquals(['credentials' => ['name' => 'Sam']], $composition->properties());
 }