eZ\Publish\Core\Persistence\Legacy\Tests\Content\ContentHandlerTest::testLoadReverseRelations PHP Method

testLoadReverseRelations() public method

    public function testLoadReverseRelations()
    {
        $handler = $this->getContentHandler();
        $gatewayMock = $this->getGatewayMock();
        $mapperMock = $this->getMapperMock();
        $gatewayMock->expects($this->once())->method('loadReverseRelations')->with($this->equalTo(23), $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->loadReverseRelations(23);
        $this->assertEquals($result, $this->getRelationFixture());
    }