eZ\Publish\Core\Repository\Tests\Service\Mock\UrlAliasTest::testConstructor PHP Method

testConstructor() public method

Test for the __construct() method.
public testConstructor ( )
    public function testConstructor()
    {
        $repositoryMock = $this->getRepositoryMock();
        $languageServiceMock = $this->getMock('eZ\\Publish\\Core\\Repository\\LanguageService', array(), array(), '', false);
        /** @var \eZ\Publish\SPI\Persistence\Content\UrlAlias\Handler $urlAliasHandler */
        $urlAliasHandler = $this->getPersistenceMockHandler('Content\\UrlAlias\\Handler');
        $settings = array('settings');
        $languageServiceMock->expects($this->once())->method('getPrioritizedLanguageCodeList')->will($this->returnValue(array('prioritizedLanguageList')));
        $repositoryMock->expects($this->once())->method('getContentLanguageService')->will($this->returnValue($languageServiceMock));
        $service = new UrlALiasService($repositoryMock, $urlAliasHandler, $settings);
        $this->assertAttributeSame($repositoryMock, 'repository', $service);
        $this->assertAttributeSame($urlAliasHandler, 'urlAliasHandler', $service);
        $this->assertAttributeSame(array('settings', 'showAllTranslations' => false, 'prioritizedLanguageList' => array('prioritizedLanguageList')), 'settings', $service);
    }
UrlAliasTest