X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FCRM%2FUtils%2FSystemTest.php;h=37f065b8681fe50847b669d0a9b709722b90e9b0;hb=b6708aebbc04438be1e5a8a97213d0fc9a89d483;hp=0862d0af8d34c21cc2bcab1f87442a21eede677e;hpb=6a4880350680e1e4d20e5c8a622a791f926ca750;p=civicrm-core.git diff --git a/tests/phpunit/CRM/Utils/SystemTest.php b/tests/phpunit/CRM/Utils/SystemTest.php index 0862d0af8d..37f065b868 100644 --- a/tests/phpunit/CRM/Utils/SystemTest.php +++ b/tests/phpunit/CRM/Utils/SystemTest.php @@ -23,7 +23,7 @@ class CRM_Utils_SystemTest extends CiviUnitTestCase { $actual = CRM_Utils_System::url('civicrm/foo/bar', 'foo=ab&bar=cd%26ef', false, null, false); $this->assertEquals($expected, $actual); } - + function testUrlQueryArray() { $config = CRM_Core_Config::singleton(); $this->assertTrue($config->userSystem instanceof CRM_Utils_System_UnitTests); @@ -34,4 +34,10 @@ class CRM_Utils_SystemTest extends CiviUnitTestCase { ), false, null, false); $this->assertEquals($expected, $actual); } + + public function testEvalUrl() { + $this->assertEquals(FALSE, CRM_Utils_System::evalUrl(FALSE)); + $this->assertEquals('http://example.com/', CRM_Utils_System::evalUrl('http://example.com/')); + $this->assertEquals('http://example.com/?cms=UnitTests', CRM_Utils_System::evalUrl('http://example.com/?cms={uf}')); + } }