Files
piratepoet/tests/unit/Util/UrlTest.php
Jan Jakeš 1b5b9d89ff Autofix namespace declaration spacing
[MAILPOET-2409]
2019-10-01 14:29:30 +01:00

19 lines
479 B
PHP

<?php
namespace MailPoet\Test\Util;
use Codeception\Stub;
use MailPoet\Util\Url;
use MailPoet\WP\Functions as WPFunctions;
class UrlTest extends \MailPoetUnitTest {
function testCurrentUrlReturnsHomeUrlOnHome() {
$home_url = 'http://example.com';
$url_helper = new Url(Stub::make(new WPFunctions(), [
'homeUrl' => $home_url,
'addQueryArg' => '',
]));
$current_url = $url_helper->getCurrentUrl();
expect($current_url)->equals($home_url);
}
}