codeception/verify 2.1 removed support for expect()->equals() so we need to replace it with verify()->equals(). [MAILPOET-5664]
20 lines
507 B
PHP
20 lines
507 B
PHP
<?php declare(strict_types = 1);
|
|
|
|
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();
|
|
verify($currentUrl)->equals($homeUrl);
|
|
}
|
|
}
|