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