Metabor\Statemachine\Util\StateCollectionMergerTest::testCopiesAllFlags PHP Method

testCopiesAllFlags() public method

public testCopiesAllFlags ( )
    public function testCopiesAllFlags()
    {
        $targetCollection = new StateCollection();
        $merger = new StateCollectionMerger($targetCollection);
        $sourceCollection = $this->createSourceCollection();
        $merger->merge($sourceCollection);
        $state = $targetCollection->getState('new');
        $this->assertArrayHasKey(self::FLAG_FOR_TEST, $state);
        $this->assertEquals(self::FLAG_FOR_TEST_VALUE, $state[self::FLAG_FOR_TEST]);
        $event = $state->getEvent('start');
        $this->assertArrayHasKey(self::FLAG_FOR_TEST, $event);
        $this->assertEquals(self::FLAG_FOR_TEST_VALUE, $event[self::FLAG_FOR_TEST]);
    }