diff --git a/mailpoet/tests/_support/AcceptanceTester.php b/mailpoet/tests/_support/AcceptanceTester.php index 2e357017e8..829d109a6a 100644 --- a/mailpoet/tests/_support/AcceptanceTester.php +++ b/mailpoet/tests/_support/AcceptanceTester.php @@ -276,7 +276,7 @@ class AcceptanceTester extends \Codeception\Actor { public function assertAttributeNotContains($selector, $attribute, $notContains) { $i = $this; $attributeValue = $i->grabAttributeFrom($selector, $attribute); - expect($attributeValue)->stringNotContainsString($notContains); + verify($attributeValue)->stringNotContainsString($notContains); } public function searchFor($query, $element = '#search_input') { diff --git a/mailpoet/tests/integration/API/JSON/v1/NewslettersTest.php b/mailpoet/tests/integration/API/JSON/v1/NewslettersTest.php index 891d3d4457..f99d4e2484 100644 --- a/mailpoet/tests/integration/API/JSON/v1/NewslettersTest.php +++ b/mailpoet/tests/integration/API/JSON/v1/NewslettersTest.php @@ -646,7 +646,7 @@ class NewslettersTest extends \MailPoetTest { ]); $response = $this->endpoint->showPreview($data); - expect($response->meta['preview_url'])->stringNotContainsString('http'); + verify($response->meta['preview_url'])->stringNotContainsString('http'); expect($response->meta['preview_url'])->regExp('!^\/\/!'); } diff --git a/mailpoet/tests/integration/Config/ShortcodesTest.php b/mailpoet/tests/integration/Config/ShortcodesTest.php index 51f9582a03..fe337bb72b 100644 --- a/mailpoet/tests/integration/Config/ShortcodesTest.php +++ b/mailpoet/tests/integration/Config/ShortcodesTest.php @@ -91,7 +91,7 @@ class ShortcodesTest extends \MailPoetTest { ->create(); $result = do_shortcode('[mailpoet_archive start_date="2023-09-04"]'); - expect($result)->stringNotContainsString('Newsletter 1'); + verify($result)->stringNotContainsString('Newsletter 1'); verify($result)->stringContainsString('Newsletter 2'); } @@ -109,7 +109,7 @@ class ShortcodesTest extends \MailPoetTest { $result = do_shortcode('[mailpoet_archive end_date="2023-09-04"]'); verify($result)->stringContainsString('Newsletter 1'); - expect($result)->stringNotContainsString('Newsletter 2'); + verify($result)->stringNotContainsString('Newsletter 2'); } public function testArchiveAcceptsStartAndEndDate(): void { @@ -130,9 +130,9 @@ class ShortcodesTest extends \MailPoetTest { ->create(); $result = do_shortcode('[mailpoet_archive start_date="2023-08-02" end_date="2023-08-14"]'); - expect($result)->stringNotContainsString('Newsletter 1'); + verify($result)->stringNotContainsString('Newsletter 1'); verify($result)->stringContainsString('Newsletter 2'); - expect($result)->stringNotContainsString('Newsletter 3'); + verify($result)->stringNotContainsString('Newsletter 3'); } public function testArchiveAcceptsSubjectSearch(): void { @@ -155,7 +155,7 @@ class ShortcodesTest extends \MailPoetTest { $result = do_shortcode('[mailpoet_archive subject_contains="great"]'); verify($result)->stringContainsString('Great subject'); verify($result)->stringContainsString('Subject that is great'); - expect($result)->stringNotContainsString('Good subject'); + verify($result)->stringNotContainsString('Good subject'); } public function testArchiveAcceptsLastNDays(): void { @@ -171,7 +171,7 @@ class ShortcodesTest extends \MailPoetTest { ->create(); $result = do_shortcode('[mailpoet_archive in_the_last_days="4"]'); verify($result)->stringContainsString('Newsletter 1'); - expect($result)->stringNotContainsString('Newsletter 2'); + verify($result)->stringNotContainsString('Newsletter 2'); } public function testArchiveAcceptsSegments(): void { @@ -191,7 +191,7 @@ class ShortcodesTest extends \MailPoetTest { ->create(); $result = do_shortcode(sprintf("[mailpoet_archive segments=\"%s\"]", $segment2->getId())); - expect($result)->stringNotContainsString('Newsletter 1'); + verify($result)->stringNotContainsString('Newsletter 1'); verify($result)->stringContainsString('Newsletter 2'); } @@ -220,12 +220,12 @@ class ShortcodesTest extends \MailPoetTest { $result = do_shortcode('[mailpoet_archive limit="2"]'); verify($result)->stringContainsString('Newsletter 1'); verify($result)->stringContainsString('Newsletter 2'); - expect($result)->stringNotContainsString('Newsletter 3'); + verify($result)->stringNotContainsString('Newsletter 3'); $result = do_shortcode('[mailpoet_archive limit="1"]'); verify($result)->stringContainsString('Newsletter 1'); - expect($result)->stringNotContainsString('Newsletter 2'); - expect($result)->stringNotContainsString('Newsletter 3'); + verify($result)->stringNotContainsString('Newsletter 2'); + verify($result)->stringNotContainsString('Newsletter 3'); } public function testItRendersShortcodeDefaultsInSubject() { diff --git a/mailpoet/tests/integration/Cron/Workers/SendingQueue/Tasks/NewsletterTest.php b/mailpoet/tests/integration/Cron/Workers/SendingQueue/Tasks/NewsletterTest.php index b5bff852c3..8f0f2b2d25 100644 --- a/mailpoet/tests/integration/Cron/Workers/SendingQueue/Tasks/NewsletterTest.php +++ b/mailpoet/tests/integration/Cron/Workers/SendingQueue/Tasks/NewsletterTest.php @@ -205,9 +205,9 @@ class NewsletterTest extends \MailPoetTest { verify($link)->null(); $updatedQueue = SendingTask::getByNewsletterId($this->newsletter->getId()); $renderedNewsletter = $updatedQueue->getNewsletterRenderedBody(); - expect($renderedNewsletter['html']) + verify($renderedNewsletter['html']) ->stringNotContainsString('[mailpoet_click_data]'); - expect($renderedNewsletter['html']) + verify($renderedNewsletter['html']) ->stringNotContainsString('[mailpoet_open_data]'); $hookName = 'mailpoet_sending_newsletter_render_after_pre_process'; @@ -370,9 +370,9 @@ class NewsletterTest extends \MailPoetTest { $this->subscriber, $this->sendingTask ); - expect($result['body']['html']) + verify($result['body']['html']) ->stringNotContainsString(Router::NAME . '&endpoint=track&action=click&data='); - expect($result['body']['text']) + verify($result['body']['text']) ->stringNotContainsString(Router::NAME . '&endpoint=track&action=click&data='); } @@ -516,9 +516,9 @@ class NewsletterTest extends \MailPoetTest { $wooCommerceHelper = $this->diContainer->get(Helper::class); $coupon = (string)$wooCommerceHelper->getLatestCoupon(); - expect($result['body']['html'])->stringNotContainsString(Coupon::CODE_PLACEHOLDER); + verify($result['body']['html'])->stringNotContainsString(Coupon::CODE_PLACEHOLDER); verify($result['body']['html'])->stringContainsString($coupon); - expect($result['body']['text'])->stringNotContainsString(Coupon::CODE_PLACEHOLDER); + verify($result['body']['text'])->stringNotContainsString(Coupon::CODE_PLACEHOLDER); verify($result['body']['text'])->stringContainsString($coupon); } diff --git a/mailpoet/tests/integration/Newsletter/Blocks/AbandonedCartContentTest.php b/mailpoet/tests/integration/Newsletter/Blocks/AbandonedCartContentTest.php index 232c0c5a99..0d573cb577 100644 --- a/mailpoet/tests/integration/Newsletter/Blocks/AbandonedCartContentTest.php +++ b/mailpoet/tests/integration/Newsletter/Blocks/AbandonedCartContentTest.php @@ -112,8 +112,8 @@ class AbandonedCartContentTest extends \MailPoetTest { $encodedResult = json_encode($result); verify($encodedResult)->stringContainsString('Product 4'); verify($encodedResult)->stringContainsString('Product 3'); - expect($encodedResult)->stringNotContainsString('Product 2'); - expect($encodedResult)->stringNotContainsString('Product 1'); + verify($encodedResult)->stringNotContainsString('Product 2'); + verify($encodedResult)->stringNotContainsString('Product 1'); } public function testItDoesNotRenderIfNoSendingTaskIsSupplied() { @@ -145,7 +145,7 @@ class AbandonedCartContentTest extends \MailPoetTest { $sendingTask = $this->createSendingTask($newsletter); $result = $this->block->render($newsletter, $this->accBlock, false, $sendingTask); $encodedResult = json_encode($result); - expect($encodedResult)->stringNotContainsString('Product 4'); + verify($encodedResult)->stringNotContainsString('Product 4'); verify($encodedResult)->stringContainsString('Product 3'); verify($encodedResult)->stringContainsString('Product 2'); verify($encodedResult)->stringContainsString('Product 1'); diff --git a/mailpoet/tests/integration/Newsletter/Blocks/AutomatedLatestContentBlockTest.php b/mailpoet/tests/integration/Newsletter/Blocks/AutomatedLatestContentBlockTest.php index b1f30b9a0d..a4fb2f1014 100644 --- a/mailpoet/tests/integration/Newsletter/Blocks/AutomatedLatestContentBlockTest.php +++ b/mailpoet/tests/integration/Newsletter/Blocks/AutomatedLatestContentBlockTest.php @@ -113,8 +113,8 @@ class AutomatedLatestContentBlockTest extends \MailPoetTest { $encodedResult = json_encode($result); verify($encodedResult)->stringContainsString('POST 4'); verify($encodedResult)->stringContainsString('POST 3'); - expect($encodedResult)->stringNotContainsString('POST 2'); - expect($encodedResult)->stringNotContainsString('POST 1'); + verify($encodedResult)->stringNotContainsString('POST 2'); + verify($encodedResult)->stringNotContainsString('POST 1'); } public function testItRendersPostOnlyOncePerEmail() { @@ -124,12 +124,12 @@ class AutomatedLatestContentBlockTest extends \MailPoetTest { $encodedResult = json_encode($result); verify($encodedResult)->stringContainsString('POST 4'); verify($encodedResult)->stringContainsString('POST 3'); - expect($encodedResult)->stringNotContainsString('POST 2'); - expect($encodedResult)->stringNotContainsString('POST 1'); + verify($encodedResult)->stringNotContainsString('POST 2'); + verify($encodedResult)->stringNotContainsString('POST 1'); $result = $this->block->render($notificationHistory, $this->alcBlock); $encodedResult = json_encode($result); - expect($encodedResult)->stringNotContainsString('POST 4'); - expect($encodedResult)->stringNotContainsString('POST 3'); + verify($encodedResult)->stringNotContainsString('POST 4'); + verify($encodedResult)->stringNotContainsString('POST 3'); verify($encodedResult)->stringContainsString('POST 2'); verify($encodedResult)->stringContainsString('POST 1'); } @@ -141,16 +141,16 @@ class AutomatedLatestContentBlockTest extends \MailPoetTest { $encodedResult = json_encode($result); verify($encodedResult)->stringContainsString('POST 4'); verify($encodedResult)->stringContainsString('POST 3'); - expect($encodedResult)->stringNotContainsString('POST 2'); - expect($encodedResult)->stringNotContainsString('POST 1'); + verify($encodedResult)->stringNotContainsString('POST 2'); + verify($encodedResult)->stringNotContainsString('POST 1'); $notification2 = $this->createNewsletter('Newsletter2', NewsletterEntity::TYPE_NOTIFICATION); $notificationHistory2 = $this->createNewsletter('Newsletter2', NewsletterEntity::TYPE_NOTIFICATION_HISTORY, $notification2); $result = $this->block->render($notificationHistory2, $this->alcBlock); $encodedResult = json_encode($result); verify($encodedResult)->stringContainsString('POST 4'); verify($encodedResult)->stringContainsString('POST 3'); - expect($encodedResult)->stringNotContainsString('POST 2'); - expect($encodedResult)->stringNotContainsString('POST 1'); + verify($encodedResult)->stringNotContainsString('POST 2'); + verify($encodedResult)->stringNotContainsString('POST 1'); } public function testItRendersOnlyPostsNewerThanLastSent() { @@ -164,9 +164,9 @@ class AutomatedLatestContentBlockTest extends \MailPoetTest { $result = $this->block->render($notificationHistory, $this->alcBlock); $encodedResult = json_encode($result); verify($encodedResult)->stringContainsString('POST 4'); - expect($encodedResult)->stringNotContainsString('POST 3'); - expect($encodedResult)->stringNotContainsString('POST 2'); - expect($encodedResult)->stringNotContainsString('POST 1'); + verify($encodedResult)->stringNotContainsString('POST 3'); + verify($encodedResult)->stringNotContainsString('POST 2'); + verify($encodedResult)->stringNotContainsString('POST 1'); } private function createPost(string $title, string $publishDate, string $type = 'post') { diff --git a/mailpoet/tests/integration/Newsletter/Links/LinksTest.php b/mailpoet/tests/integration/Newsletter/Links/LinksTest.php index 8d9a9ca2f5..d2aaa83521 100644 --- a/mailpoet/tests/integration/Newsletter/Links/LinksTest.php +++ b/mailpoet/tests/integration/Newsletter/Links/LinksTest.php @@ -97,7 +97,7 @@ class LinksTest extends \MailPoetTest { ->stringContainsString(Links::DATA_TAG_CLICK . '-' . $hashedLinks[0]['hash']); verify($updatedContent) ->stringContainsString(Links::DATA_TAG_CLICK . '-' . $hashedLinks[1]['hash']); - expect($updatedContent)->stringNotContainsString('link'); + verify($updatedContent)->stringNotContainsString('link'); } public function testItHashesAndReplacesLinksWithSpecialCharacters() { @@ -131,7 +131,7 @@ class LinksTest extends \MailPoetTest { ->stringContainsString('replace by this'); verify($updatedContent) ->stringContainsString('[link:some_link_shortcode]'); - expect($updatedContent)->stringNotContainsString('http://example.com'); + verify($updatedContent)->stringNotContainsString('http://example.com'); } public function testItCreatesAndTransformsUrlDataObject() { @@ -168,8 +168,8 @@ class LinksTest extends \MailPoetTest { $result = $this->links->replaceSubscriberData($subscriber->getId(), $queue->getId(), $template); // there are no click/open data tags - expect($result)->stringNotContainsString(Links::DATA_TAG_CLICK); - expect($result)->stringNotContainsString(Links::DATA_TAG_OPEN); + verify($result)->stringNotContainsString(Links::DATA_TAG_CLICK); + verify($result)->stringNotContainsString(Links::DATA_TAG_OPEN); // data tags were converted to URLs expect($result) diff --git a/mailpoet/tests/integration/Newsletter/RendererTest.php b/mailpoet/tests/integration/Newsletter/RendererTest.php index 791a223b87..c4a452cc69 100644 --- a/mailpoet/tests/integration/Newsletter/RendererTest.php +++ b/mailpoet/tests/integration/Newsletter/RendererTest.php @@ -428,7 +428,7 @@ class RendererTest extends \MailPoetTest { verify( $DOM('tr > td > table > tr > td.mailpoet_blockquote', 0)->html() )->stringContainsString('
assertIsArray($body);
$this->newsletter->setBody($body);
$template = $this->renderer->render($this->newsletter);
- expect($template['html'])->stringNotContainsString('mailpoet_logo_newsletter.png');
+ verify($template['html'])->stringNotContainsString('mailpoet_logo_newsletter.png');
}
public function testItDoesNotAddMailpoetLogoWhenPreviewIsEnabled() {
@@ -615,7 +615,7 @@ class RendererTest extends \MailPoetTest {
$this->assertIsArray($body);
$this->newsletter->setBody($body);
$template = $this->renderer->renderAsPreview($this->newsletter);
- expect($template['html'])->stringNotContainsString('mailpoet_logo_newsletter.png');
+ verify($template['html'])->stringNotContainsString('mailpoet_logo_newsletter.png');
}
public function testItAddsMailpoetLogo() {
diff --git a/mailpoet/tests/integration/Newsletter/ViewInBrowser/ViewInBrowserRendererTest.php b/mailpoet/tests/integration/Newsletter/ViewInBrowser/ViewInBrowserRendererTest.php
index 4fb28e74da..4eae5cb500 100644
--- a/mailpoet/tests/integration/Newsletter/ViewInBrowser/ViewInBrowserRendererTest.php
+++ b/mailpoet/tests/integration/Newsletter/ViewInBrowser/ViewInBrowserRendererTest.php
@@ -214,7 +214,7 @@ class ViewInBrowserRendererTest extends \MailPoetTest {
$queue
);
// hashed link should be replaced with a URL
- expect($renderedBody)->stringNotContainsString('[mailpoet_click_data]');
+ verify($renderedBody)->stringNotContainsString('[mailpoet_click_data]');
verify($renderedBody)->stringContainsString('');
}
@@ -229,7 +229,7 @@ class ViewInBrowserRendererTest extends \MailPoetTest {
$queue
);
// open tracking data tag should be removed
- expect($renderedBody)->stringNotContainsString('[mailpoet_open_data]');
+ verify($renderedBody)->stringNotContainsString('[mailpoet_open_data]');
verify($renderedBody)->stringContainsString('');
}
}
diff --git a/mailpoet/tests/integration/Util/Notices/HeadersAlreadySentNoticeTest.php b/mailpoet/tests/integration/Util/Notices/HeadersAlreadySentNoticeTest.php
index 52ba10a124..42131896a9 100644
--- a/mailpoet/tests/integration/Util/Notices/HeadersAlreadySentNoticeTest.php
+++ b/mailpoet/tests/integration/Util/Notices/HeadersAlreadySentNoticeTest.php
@@ -92,13 +92,13 @@ class HeadersAlreadySentNoticeTest extends \MailPoetTest {
$headersAlreadySentNotice = Stub::make(HeadersAlreadySentNotice::class);
$notice = $headersAlreadySentNotice->display(false, true);
verify($notice->getMessage())->stringContainsString('Inaccurate tracking');
- expect($notice->getMessage())->stringNotContainsString('CAPTCHA not rendering');
+ verify($notice->getMessage())->stringNotContainsString('CAPTCHA not rendering');
}
public function testItPrintsNoTrackingMessageIftrackingDisabled() {
$headersAlreadySentNotice = Stub::make(HeadersAlreadySentNotice::class);
$notice = $headersAlreadySentNotice->display(true, false);
- expect($notice->getMessage())->stringNotContainsString('Inaccurate tracking');
+ verify($notice->getMessage())->stringNotContainsString('Inaccurate tracking');
verify($notice->getMessage())->stringContainsString('CAPTCHA not rendering');
}
diff --git a/mailpoet/tests/integration/WooCommerce/SubscriptionTest.php b/mailpoet/tests/integration/WooCommerce/SubscriptionTest.php
index d1716b2f6d..41aec53d07 100644
--- a/mailpoet/tests/integration/WooCommerce/SubscriptionTest.php
+++ b/mailpoet/tests/integration/WooCommerce/SubscriptionTest.php
@@ -78,7 +78,7 @@ class SubscriptionTest extends \MailPoetTest {
$subscriber = $this->subscribersRepository->getCurrentWPUser();
$this->assertInstanceOf(SubscriberEntity::class, $subscriber);
$this->subscribeToSegment($subscriber, $this->wcSegment);
- expect($this->getRenderedOptinField())->stringNotContainsString('checked');
+ verify($this->getRenderedOptinField())->stringNotContainsString('checked');
}
public function testItDisplaysAnUncheckedCheckboxIfCurrentUserIsNotSubscribed() {
@@ -88,12 +88,12 @@ class SubscriptionTest extends \MailPoetTest {
$subscriber = $this->subscribersRepository->getCurrentWPUser();
$this->assertInstanceOf(SubscriberEntity::class, $subscriber);
$this->unsubscribeToSegment($subscriber, $this->wcSegment);
- expect($this->getRenderedOptinField())->stringNotContainsString('checked');
+ verify($this->getRenderedOptinField())->stringNotContainsString('checked');
}
public function testItDisplaysAnUncheckedCheckboxIfCurrentUserIsNotLoggedIn() {
wp_set_current_user(0);
- expect($this->getRenderedOptinField())->stringNotContainsString('checked');
+ verify($this->getRenderedOptinField())->stringNotContainsString('checked');
}
public function testItDisplaysCheckboxOptinMessageFromSettings() {
diff --git a/mailpoet/tests/integration/WooCommerce/TransactionalEmails/RendererTest.php b/mailpoet/tests/integration/WooCommerce/TransactionalEmails/RendererTest.php
index 30e749e2cf..ce58ea0c59 100644
--- a/mailpoet/tests/integration/WooCommerce/TransactionalEmails/RendererTest.php
+++ b/mailpoet/tests/integration/WooCommerce/TransactionalEmails/RendererTest.php
@@ -51,16 +51,16 @@ class RendererTest extends \MailPoetTest {
verify($html)->stringContainsString('Some text before heading');
verify($html)->stringContainsString('Heading Text');
verify($html)->stringContainsString('Some text between heading and content');
- expect($html)->stringNotContainsString('Some text after content');
+ verify($html)->stringNotContainsString('Some text after content');
}
public function testGetHTMLAfterContent() {
$renderer = $this->getRenderer();
$renderer->render($this->newsletter, 'Heading Text');
$html = $renderer->getHTMLAfterContent();
- expect($html)->stringNotContainsString('Some text before heading');
- expect($html)->stringNotContainsString('Heading Text');
- expect($html)->stringNotContainsString('Some text between heading and content');
+ verify($html)->stringNotContainsString('Some text before heading');
+ verify($html)->stringNotContainsString('Heading Text');
+ verify($html)->stringNotContainsString('Some text between heading and content');
verify($html)->stringContainsString('Some text after content');
}
diff --git a/mailpoet/tests/unit/Form/Block/ColumnsTest.php b/mailpoet/tests/unit/Form/Block/ColumnsTest.php
index cc5f524e80..aa4a984cbf 100644
--- a/mailpoet/tests/unit/Form/Block/ColumnsTest.php
+++ b/mailpoet/tests/unit/Form/Block/ColumnsTest.php
@@ -74,7 +74,7 @@ class ColumnsTest extends \MailPoetUnitTest {
$html = $this->columns->render($block, 'content');
$column = $this->htmlParser->getElementByXpath($html, '//div[1]');
$class = $this->htmlParser->getAttribute($column, 'class');
- expect($class->textContent)->stringNotContainsString('mailpoet_stack_on_mobile');
+ verify($class->textContent)->stringNotContainsString('mailpoet_stack_on_mobile');
}
public function testItShouldRenderCustomBackground() {
diff --git a/mailpoet/tests/unit/Form/Block/SelectTest.php b/mailpoet/tests/unit/Form/Block/SelectTest.php
index d50becdd29..dafff98539 100644
--- a/mailpoet/tests/unit/Form/Block/SelectTest.php
+++ b/mailpoet/tests/unit/Form/Block/SelectTest.php
@@ -97,6 +97,6 @@ class SelectTest extends \MailPoetUnitTest {
public function testItDoesNotRenderHiddenOptions() {
$this->block['params']['values'][2]['is_hidden'] = true;
$rendered = $this->selectBlock->render($this->block, []);
- expect($rendered)->stringNotContainsString(SubscriberEntity::STATUS_BOUNCED);
+ verify($rendered)->stringNotContainsString(SubscriberEntity::STATUS_BOUNCED);
}
}
diff --git a/mailpoet/tests/unit/Form/BlockStylesRendererTest.php b/mailpoet/tests/unit/Form/BlockStylesRendererTest.php
index 9d22fa7858..364a817490 100644
--- a/mailpoet/tests/unit/Form/BlockStylesRendererTest.php
+++ b/mailpoet/tests/unit/Form/BlockStylesRendererTest.php
@@ -49,7 +49,7 @@ class BlockStylesRendererTest extends \MailPoetUnitTest {
verify($result)->stringContainsString('background-color:#dddddd;');
verify($result)->stringContainsString('padding:40px;');
verify($result)->stringContainsString('font-size:13px;');
- expect($result)->stringNotContainsString('font-weight:bold;');
+ verify($result)->stringNotContainsString('font-weight:bold;');
}
public function testItShouldRenderSingleButtonStyles() {
diff --git a/mailpoet/tests/unit/Form/Util/FieldNameObfuscatorTest.php b/mailpoet/tests/unit/Form/Util/FieldNameObfuscatorTest.php
index 10bcb0a43a..01b2b9331b 100644
--- a/mailpoet/tests/unit/Form/Util/FieldNameObfuscatorTest.php
+++ b/mailpoet/tests/unit/Form/Util/FieldNameObfuscatorTest.php
@@ -21,7 +21,7 @@ class FieldNameObfuscatorTest extends \MailPoetUnitTest {
}
public function testObfuscateWorks() {
- expect($this->obfuscator->obfuscate('email'))->stringNotContainsString('email');
+ verify($this->obfuscator->obfuscate('email'))->stringNotContainsString('email');
}
public function testObfuscateDeobfuscateWorks() {
diff --git a/mailpoet/tests/unit/Form/Util/StylesTest.php b/mailpoet/tests/unit/Form/Util/StylesTest.php
index ca7bbe206a..bf4ac671d9 100644
--- a/mailpoet/tests/unit/Form/Util/StylesTest.php
+++ b/mailpoet/tests/unit/Form/Util/StylesTest.php
@@ -165,8 +165,8 @@ class StylesTest extends \MailPoetUnitTest {
// BC Style
$styles = $this->styles->renderFormSettingsStyles($this->createForm($form), '#prefix', FormEntity::DISPLAY_TYPE_BELOW_POST);
list($styleWithoutMedia) = explode('@media ', $styles);
- expect($styleWithoutMedia)->stringNotContainsString('width:');
- expect($styleWithoutMedia)->stringNotContainsString('max-width:');
+ verify($styleWithoutMedia)->stringNotContainsString('width:');
+ verify($styleWithoutMedia)->stringNotContainsString('max-width:');
// Pixel
$width = [
'unit' => 'pixel',
@@ -180,7 +180,7 @@ class StylesTest extends \MailPoetUnitTest {
$styles = $this->styles->renderFormSettingsStyles($this->createForm($form), '#prefix', FormEntity::DISPLAY_TYPE_BELOW_POST);
list($styleWithoutMedia) = explode('@media ', $styles);
verify($styleWithoutMedia)->stringContainsString('width: 900px;');
- expect($styleWithoutMedia)->stringNotContainsString('max-width:');
+ verify($styleWithoutMedia)->stringNotContainsString('max-width:');
}
public function testItRendersWidthCssForFixedBar() {
@@ -255,8 +255,8 @@ class StylesTest extends \MailPoetUnitTest {
// BC Style
$styles = $this->styles->renderFormSettingsStyles($this->createForm($form), '#prefix', FormEntity::DISPLAY_TYPE_OTHERS);
list($styleWithoutMedia) = explode('@media ', $styles);
- expect($styleWithoutMedia)->stringNotContainsString('width:');
- expect($styleWithoutMedia)->stringNotContainsString('max-width:');
+ verify($styleWithoutMedia)->stringNotContainsString('width:');
+ verify($styleWithoutMedia)->stringNotContainsString('max-width:');
// Percent
$width = [
'unit' => 'percent',
@@ -270,7 +270,7 @@ class StylesTest extends \MailPoetUnitTest {
$styles = $this->styles->renderFormSettingsStyles($this->createForm($form), '#prefix', FormEntity::DISPLAY_TYPE_OTHERS);
list($styleWithoutMedia) = explode('@media ', $styles);
verify($styleWithoutMedia)->stringContainsString('width: 90%;');
- expect($styleWithoutMedia)->stringNotContainsString('max-width:');
+ verify($styleWithoutMedia)->stringNotContainsString('max-width:');
}
public function testItRendersSlideInSpecificStyles() {
diff --git a/mailpoet/tests/unit/Newsletter/Renderer/Blocks/TextTest.php b/mailpoet/tests/unit/Newsletter/Renderer/Blocks/TextTest.php
index 253d760fc4..4d645aa2f0 100644
--- a/mailpoet/tests/unit/Newsletter/Renderer/Blocks/TextTest.php
+++ b/mailpoet/tests/unit/Newsletter/Renderer/Blocks/TextTest.php
@@ -183,7 +183,7 @@ class TextTest extends \MailPoetUnitTest {
public function testItRemovesLastLineBreak() {
$this->block['text'] = 'hello
';
$output = (new Text)->render($this->block);
- expect($output)->stringNotContainsString('
');
+ verify($output)->stringNotContainsString('
');
}
public function htmlEntitiesStrings() {
@@ -200,7 +200,7 @@ class TextTest extends \MailPoetUnitTest {
public function testItDoesNotDecodeHtmlEntities($htmlString) {
$this->block['text'] = $htmlString;
$output = (new Text())->render($this->block);
- expect($output)->stringNotContainsString('