Files
piratepoet/mailpoet/tests/unit/Util/UrlTest.php
Jan Jakes 9f790efbf0 Move plugin files to a subfolder
[MAILPOET-3988]
2022-01-18 15:30:22 +01:00

20 lines
480 B
PHP

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