eZ\Publish\Core\Persistence\Legacy\Tests\Content\FieldHandlerTest::testDeleteFields PHP Method

testDeleteFields() public method

public testDeleteFields ( )
    public function testDeleteFields()
    {
        $fieldHandler = $this->getFieldHandler();
        $contentGatewayMock = $this->getContentGatewayMock();
        $contentGatewayMock->expects($this->once())->method('getFieldIdsByType')->with($this->equalTo(42), $this->equalTo(2))->will($this->returnValue(array('some-type' => array(2, 3))));
        $storageHandlerMock = $this->getStorageHandlerMock();
        $storageHandlerMock->expects($this->once())->method('deleteFieldData')->with($this->equalTo('some-type'), $this->isInstanceOf('eZ\\Publish\\SPI\\Persistence\\Content\\VersionInfo'), $this->equalTo(array(2, 3)));
        $contentGatewayMock->expects($this->once())->method('deleteFields')->with($this->equalTo(42), $this->equalTo(2));
        $fieldHandler->deleteFields(42, new VersionInfo(array('versionNo' => 2)));
    }