Skip to content

Commit

Permalink
Add test for constructor properties
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyShepherd committed Feb 18, 2017
1 parent 9c1613e commit e3f7ec4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions test/Factory/ReflectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,34 @@ public function testObjectProperty
);
}

/**
* @depends testComposite
*/
public function testConstructorItems(ReflectionComposite $reflect)
{
$this->assertEquals(1, $reflect->requiredProperties->size());
$this->assertTrue($reflect->requiredProperties->contains
(
$reflect->properties['prop1']
));

$this->assertEquals(2, $reflect->optionalProperties->size());
$this->assertTrue($reflect->optionalProperties->contains
(
$reflect->properties['prop3']
));
$this->assertTrue($reflect->optionalProperties->contains
(
$reflect->properties['prop4']
));

$this->assertEquals(1, $reflect->builtProperties->size());
$this->assertTrue($reflect->builtProperties->contains
(
$reflect->properties['prop2']
));
}

public function propertiesProvider()
{
return $this->properties;
Expand Down

0 comments on commit e3f7ec4

Please sign in to comment.