eZ\Publish\Core\Persistence\Legacy\Tests\Content\Section\SectionHandlerTest::testLoad PHP Method

testLoad() public method

public testLoad ( )
    public function testLoad()
    {
        $handler = $this->getSectionHandler();
        $gatewayMock = $this->getGatewayMock();
        $gatewayMock->expects($this->once())->method('loadSectionData')->with($this->equalTo(23))->will($this->returnValue(array(array('id' => '23', 'identifier' => 'new_section', 'name' => 'New Section'))));
        $sectionRef = new Section();
        $sectionRef->id = 23;
        $sectionRef->name = 'New Section';
        $sectionRef->identifier = 'new_section';
        $result = $handler->load(23);
        $this->assertEquals($sectionRef, $result);
    }