Add test for Definition with exeption InvalidArgument

This commit is contained in:
Ivan Menshykov 2016-06-24 13:42:32 +02:00 committed by Fabien Potencier
parent 8304bccbfb
commit 91072e6e86

View File

@ -17,6 +17,15 @@ class DefinitionTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('a', $definition->getInitialPlace());
}
/**
* @expectedException Symfony\Component\Workflow\Exception\InvalidArgumentException
*/
public function testAddPlacesInvalidArgument()
{
$places = array('a"', 'e"');
$definition = new Definition($places);
}
public function testSetInitialPlace()
{
$places = range('a', 'e');