public function testPublishUrlAliasForLocationReusesHistoryOfDifferentLanguage()
{
$handler = $this->getHandler();
$this->insertDatabaseFixture(__DIR__ . '/_fixtures/publish_base.php');
$handler->publishUrlAliasForLocation(314, 2, 'jedan', 'cro-HR');
$handler->publishUrlAliasForLocation(314, 2, 'one-history', 'eng-GB');
$handler->publishUrlAliasForLocation(314, 2, 'one-new', 'eng-GB');
$countBeforeReusing = $this->countRows();
$handler->publishUrlAliasForLocation(314, 2, 'one-history', 'cro-HR');
$urlAliasReusesHistory = $handler->lookup('one-history');
self::assertEquals($countBeforeReusing, $this->countRows());
self::assertEquals(new UrlAlias(array('id' => '0-' . md5('one-history'), 'type' => UrlAlias::LOCATION, 'destination' => 314, 'languageCodes' => array('cro-HR'), 'pathData' => array(array('always-available' => false, 'translations' => array('cro-HR' => 'one-history', 'eng-GB' => 'one-new'))), 'alwaysAvailable' => false, 'isHistory' => false, 'isCustom' => false, 'forward' => false)), $urlAliasReusesHistory);
}