eZ\Publish\Core\Persistence\Legacy\Tests\Content\Type\ContentTypeHandlerTest::testUpdate PHP Method

testUpdate() public method

public testUpdate ( )
    public function testUpdate()
    {
        $gatewayMock = $this->getGatewayMock();
        $gatewayMock->expects($this->once())->method('updateType')->with($this->equalTo(23), $this->equalTo(1), $this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Type\\UpdateStruct'));
        $handlerMock = $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Type\\Handler', array('load'), array($gatewayMock, $this->getMapperMock(), $this->getUpdateHandlerMock()));
        $handlerMock->expects($this->once())->method('load')->with($this->equalTo(23), $this->equalTo(1))->will($this->returnValue(new Type()));
        $res = $handlerMock->update(23, 1, new UpdateStruct());
        $this->assertInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Type', $res);
    }