eZ\Publish\Core\Helper\Tests\ContentInfoLocationLoader\SudoMainLocationLoaderTest::testLoadLocation PHP Method

testLoadLocation() public method

public testLoadLocation ( )
    public function testLoadLocation()
    {
        $contentInfo = new ContentInfo(['mainLocationId' => 42]);
        $location = new Location();
        $this->getRepositoryMock()->expects($this->any())->method('getPermissionResolver')->will($this->returnValue($this->getPermissionResolverMock()));
        $this->getRepositoryMock()->expects($this->any())->method('getLocationService')->will($this->returnValue($this->getLocationServiceMock()));
        $this->getLocationServiceMock()->expects($this->once())->method('loadLocation')->with(42)->will($this->returnValue($location));
        $this->assertSame($location, $this->loader->loadLocation($contentInfo));
    }