eZ\Publish\Core\Repository\Tests\Service\Integration\UrlWildcardTest::testRemove PHP Метод

testRemove() публичный Метод

Test for the remove() method.
public testRemove ( )
    public function testRemove()
    {
        $mockedService = $this->getPartlyMockedURLWildcardService();
        /** @var \PHPUnit_Framework_MockObject_MockObject $handlerMock */
        $handlerMock = $this->getPersistenceMock()->urlWildcardHandler();
        $repositoryMock = $this->getRepositoryMock();
        $repositoryMock->expects($this->once())->method('hasAccess')->with($this->equalTo('content'), $this->equalTo('urltranslator'))->will($this->returnValue(true));
        $repositoryMock->expects($this->once())->method('beginTransaction');
        $repositoryMock->expects($this->once())->method('commit');
        $handlerMock->expects($this->once())->method('remove')->with($this->equalTo('McBomb'));
        $mockedService->remove(new URLWildcard(array('id' => 'McBomb')));
    }