izzum\statemachine\TransitionTest::shouldWorkWithMultipleCommands PHP Method

shouldWorkWithMultipleCommands() public method

    public function shouldWorkWithMultipleCommands()
    {
        $from = new State('a');
        $to = new State('b');
        $rule = Transition::RULE_EMPTY;
        $command = 'izzum\\command\\SimpleCommand,izzum\\command\\NullCommand';
        $object = new Context(new Identifier(Identifier::NULL_ENTITY_ID, Identifier::NULL_STATEMACHINE));
        $transition = new Transition($from, $to, null, $rule, $command);
        $command = $transition->getCommand($object);
        $this->assertTrue(is_a($command, 'izzum\\command\\Composite'));
        $this->assertContains('izzum\\command\\SimpleCommand', $command->toString());
        $this->assertContains('izzum\\command\\NullCommand', $command->toString());
        $this->assertEquals('izzum\\command\\Composite consisting of: [izzum\\command\\SimpleCommand, izzum\\command\\NullCommand]', $command->toString());
    }