<commit_before><?php

namespace Symfony\Component\Workflow\Tests;

use Symfony\Component\Workflow\Definition;
use Symfony\Component\Workflow\Transition;

class DefinitionTest extends \PHPUnit_Framework_TestCase
{
    public function testAddPlaces()
    {
        $places = range('a', 'e');
        $definition = new Definition($places);

        $this->assertCount(5, $definition->getPlaces());

        $this->assertEquals('a', $definition->getInitialPlace());<commit_msg>minor #19169 Add test for Definition with exeption InvalidArgument (IvanMenshykov)<commit_after><?php

namespace Symfony\Component\Workflow\Tests;

use Symfony\Component\Workflow\Definition;
use Symfony\Component\Workflow\Transition;

class DefinitionTest extends \PHPUnit_Framework_TestCase
{
    public function testAddPlaces()
    {
        $places = range('a', 'e');
        $definition = new Definition($places);

        $this->assertCount(5, $definition->getPlaces());

        $this->assertEquals('a', $definition->getInitialPlace());
    }

    /**
     * @expectedException Symfony\Component\Workflow\Exception\InvalidArgumentException
     */
    public function testAddPlacesInvalidArgument()
    {
        $places = array('a"', 'e"');
        $definition = new Definition($places);
{'fraction_non_alphanumeric': 0.12943962115232832, 'fraction_numerical': 0.0055248618784530384, 'mean_word_length': 4.092369477911647, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6166339', 'n_tokens_mistral': 361, 'n_tokens_neox': 345, 'n_words': 67}