minor #19169 Add test for Definition with exeption InvalidArgument (IvanMenshykov)

This PR was squashed before being merged into the 3.2-dev branch (closes #19169).

Discussion
----------

Add test for Definition with exeption InvalidArgument

Add test for Definition with exeption InvalidArgument

| Q             | A
| ------------- | ---
| Branch?       | "master" for new features / 2.7, 2.8, 3.0 or 3.1 for fixes
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

91072e6 Add test for Definition with exeption InvalidArgument
This commit is contained in:
Fabien Potencier 2016-06-30 09:48:33 +02:00
commit 75f4142dff

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');