Fix assert in Helper

[MAILPOET-4258]
This commit is contained in:
David Remer
2022-11-24 15:53:20 +02:00
committed by Jan Lysý
parent 353d3389cd
commit 173f347431

View File

@@ -4,6 +4,7 @@ namespace Helper;
use Codeception\Module\WebDriver;
use Codeception\TestInterface;
use PHPUnit\Framework\Assert;
// here you can define custom actions
// all public methods declared in helper class will be available in $I
@@ -19,7 +20,7 @@ class Acceptance extends \Codeception\Module {
*/
public function seeNoJSErrors() {
$wd = $this->getModule('WPWebDriver');
assert($wd instanceof WebDriver);
Assert::assertInstanceOf(WebDriver::class, $wd);
try {
$logEntries = array_slice(
@@ -48,7 +49,7 @@ class Acceptance extends \Codeception\Module {
public function getCurrentUrl() {
$wd = $this->getModule('WPWebDriver');
assert($wd instanceof WebDriver);
Assert::assertInstanceOf(WebDriver::class, $wd);
return $wd->_getCurrentUri();
}