eZ\Publish\Core\Persistence\Cache\Tests\SectionHandlerTest::testLoadByIdentifier PHP Method

testLoadByIdentifier() public method

    public function testLoadByIdentifier()
    {
        $this->loggerMock->expects($this->once())->method('logCall');
        $this->cacheMock->expects($this->never())->method($this->anything());
        $innerHandler = $this->getMock('eZ\\Publish\\SPI\\Persistence\\Content\\Section\\Handler');
        $this->persistenceHandlerMock->expects($this->once())->method('sectionHandler')->will($this->returnValue($innerHandler));
        $innerHandler->expects($this->once())->method('loadByIdentifier')->with('intranet')->will($this->returnValue(new SPISection(array('id' => 33, 'name' => 'Intranet', 'identifier' => 'intranet'))));
        $handler = $this->persistenceCacheHandler->sectionHandler();
        $handler->loadByIdentifier('intranet');
    }