2014-08-14 08:23:31 -04:00
|
|
|
<?php
|
2026-03-26 12:46:27 -04:00
|
|
|
|
|
|
|
|
// SPDX-FileCopyrightText: 2018 Icinga GmbH <https://icinga.com>
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
2014-08-14 08:23:31 -04:00
|
|
|
|
|
|
|
|
namespace Tests\Icinga\Regression;
|
|
|
|
|
|
|
|
|
|
use Icinga\Test\BaseTestCase;
|
|
|
|
|
use Icinga\Web\Url;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Regression-Test for bug #6284
|
|
|
|
|
*
|
|
|
|
|
* href-helper drops URL fragments.
|
|
|
|
|
*
|
2017-01-12 06:28:40 -05:00
|
|
|
* @see https://dev.icinga.com/issues/6284
|
2014-08-14 08:23:31 -04:00
|
|
|
*/
|
|
|
|
|
class Bug6284Test extends BaseTestCase
|
|
|
|
|
{
|
|
|
|
|
public function testWhetherUrlFromPathDoesNotDropFragments()
|
|
|
|
|
{
|
|
|
|
|
$url = 'some/route/with#anchor';
|
|
|
|
|
$this->assertEquals($url, Url::fromPath($url)->getRelativeUrl());
|
|
|
|
|
}
|
|
|
|
|
}
|