public function testLocationSwappedSiblingsSimpleWithHistory()
{
$handler = $this->getHandler();
$this->insertDatabaseFixture(__DIR__ . '/_fixtures/urlaliases_swap_siblings_simple_history.php');
$countBeforeReusing = $this->countRows();
$handler->locationSwapped(314, 2, 315, 2);
$this->assertEquals($countBeforeReusing, $this->countRows());
$urlAlias = $handler->lookup('jedan');
$this->assertEquals(new UrlAlias(array('id' => '0-' . md5('jedan'), 'type' => UrlAlias::LOCATION, 'destination' => 314, 'languageCodes' => array('cro-HR'), 'pathData' => array(array('always-available' => false, 'translations' => array('cro-HR' => 'jedan'))), 'alwaysAvailable' => false, 'isHistory' => true, 'isCustom' => false, 'forward' => false)), $urlAlias);
$urlAlias = $handler->lookup('dva');
$this->assertEquals(new UrlAlias(array('id' => '0-' . md5('dva'), 'type' => UrlAlias::LOCATION, 'destination' => 315, 'languageCodes' => array('cro-HR'), 'pathData' => array(array('always-available' => false, 'translations' => array('cro-HR' => 'dva'))), 'alwaysAvailable' => false, 'isHistory' => true, 'isCustom' => false, 'forward' => false)), $urlAlias);
$urlAlias = $handler->lookup('jedan-new');
$this->assertEquals(new UrlAlias(array('id' => '0-' . md5('jedan-new'), 'type' => UrlAlias::LOCATION, 'destination' => 315, 'languageCodes' => array('cro-HR'), 'pathData' => array(array('always-available' => false, 'translations' => array('cro-HR' => 'jedan-new'))), 'alwaysAvailable' => false, 'isHistory' => false, 'isCustom' => false, 'forward' => false)), $urlAlias);
$urlAlias = $handler->lookup('dva-new');
$this->assertEquals(new UrlAlias(array('id' => '0-' . md5('dva-new'), 'type' => UrlAlias::LOCATION, 'destination' => 314, 'languageCodes' => array('cro-HR'), 'pathData' => array(array('always-available' => false, 'translations' => array('cro-HR' => 'dva-new'))), 'alwaysAvailable' => false, 'isHistory' => false, 'isCustom' => false, 'forward' => false)), $urlAlias);
}