eZ\Publish\Core\Persistence\Legacy\Tests\Content\ContentHandlerTest::testLoadRelations PHP Метод

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

public testLoadRelations ( )
    public function testLoadRelations()
    {
        $handler = $this->getContentHandler();
        $gatewayMock = $this->getGatewayMock();
        $mapperMock = $this->getMapperMock();
        $gatewayMock->expects($this->once())->method('loadRelations')->with($this->equalTo(23), $this->equalTo(null), $this->equalTo(null))->will($this->returnValue(array(42)));
        $mapperMock->expects($this->once())->method('extractRelationsFromRows')->with($this->equalTo(array(42)))->will($this->returnValue($this->getRelationFixture()));
        $result = $handler->loadRelations(23);
        $this->assertEquals($result, $this->getRelationFixture());
    }