public function testPublish()
{
$handler = $this->getPartlyMockedHandler(array('load'));
$updateHandlerMock = $this->getUpdateHandlerMock();
$handler->expects($this->exactly(2))->method('load')->with($this->equalTo(23), $this->logicalOr($this->equalTo(0), $this->equalTo(1)))->will($this->returnValue(new Type()));
$updateHandlerMock->expects($this->once())->method('updateContentObjects')->with($this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Type'), $this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Type'));
$updateHandlerMock->expects($this->once())->method('deleteOldType')->with($this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Type'));
$updateHandlerMock->expects($this->once())->method('publishNewType')->with($this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\Type'), $this->equalTo(0));
$handler->publish(23);
}