eZ\Publish\Core\Repository\Tests\Service\Integration\UrlWildcardTest::testLoad PHP Method

testLoad() public method

Test for the load() method.
public testLoad ( )
    public function testLoad()
    {
        $mockedService = $this->getPartlyMockedURLWildcardService();
        /** @var \PHPUnit_Framework_MockObject_MockObject $handlerMock */
        $handlerMock = $this->getPersistenceMock()->urlWildcardHandler();
        $handlerMock->expects($this->once())->method('load')->with($this->equalTo('Luigi'))->will($this->returnValue(new SPIURLWildcard(array('id' => 'Luigi', 'sourceUrl' => 'this', 'destinationUrl' => 'that', 'forward' => true))));
        $urlWildcard = $mockedService->load('Luigi');
        $this->assertEquals(new URLWildcard(array('id' => 'Luigi', 'sourceUrl' => 'this', 'destinationUrl' => 'that', 'forward' => true)), $urlWildcard);
    }