eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\ContentUpdaterTest::testDetermineActions PHP Method

testDetermineActions() public method

    public function testDetermineActions()
    {
        $fromType = $this->getFromTypeFixture();
        $toType = $this->getToTypeFixture();
        $converterRegMock = $this->getConverterRegistryMock();
        $converterRegMock->expects($this->once())->method('getConverter')->with('ezstring')->will($this->returnValue($converterMock = $this->getMock('\\eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\FieldValue\\Converter')));
        $updater = $this->getContentUpdater();
        $actions = $updater->determineActions($fromType, $toType);
        $this->assertEquals(array(new ContentUpdater\Action\RemoveField($this->getContentGatewayMock(), $fromType->fieldDefinitions[0], $this->getContentStorageHandlerMock(), $this->getContentMapperMock()), new ContentUpdater\Action\AddField($this->getContentGatewayMock(), $toType->fieldDefinitions[2], $converterMock, $this->getContentStorageHandlerMock(), $this->getContentMapperMock())), $actions);
    }