stringNotContainsString('
td > ul.mailpoet_paragraph > li.mailpoet_paragraph', 0)->html()
@@ -432,10 +432,10 @@ class RendererTest extends \MailPoetTest {
$DOM('tr > td > ol.mailpoet_paragraph > li.mailpoet_paragraph', 0)->html()
)->notEmpty();
expect($DOM('tr > td.mailpoet_text > ul.mailpoet_paragraph', 0)->attr('style'))
- ->contains('padding-top:0;padding-bottom:0;margin-top:10px;text-align:left;margin-bottom:10px;');
+ ->stringContainsString('padding-top:0;padding-bottom:0;margin-top:10px;text-align:left;margin-bottom:10px;');
// headings should be styled
expect($DOM('tr > td.mailpoet_text > h1', 0)->attr('style'))
- ->contains('padding:0;font-style:normal;font-weight:normal;');
+ ->stringContainsString('padding:0;font-style:normal;font-weight:normal;');
// trailing line breaks should be cut off, but not inside an element
$template = $newsletter['content']['blocks'][0]['blocks'][0]['blocks'][8];
@@ -443,7 +443,7 @@ class RendererTest extends \MailPoetTest {
expect(count($DOM('tr > td > br', 0)))
->equals(0);
expect($DOM('tr > td > h3', 0)->html())
- ->contains('stringContainsString(' td', 0)->html())->notEmpty();
expect($DOM('a', 0)->attr('href'))->equals('http://example.com');
- expect($DOM('td > a:nth-of-type(10) > img')->attr('src'))->contains('custom.png');
+ expect($DOM('td > a:nth-of-type(10) > img')->attr('src'))->stringContainsString('custom.png');
expect($DOM('td > a:nth-of-type(10) > img')->attr('alt'))->equals('custom');
// there should be 10 icons
expect(count($DOM('a > img')))->equals(10);
@@ -593,7 +593,7 @@ class RendererTest extends \MailPoetTest {
$this->newsletter->setBody(json_decode(Fixtures::get('newsletter_body_template'), true));
$template = $this->renderer->render($this->newsletter);
- expect($template['html'])->notContains('mailpoet_logo_newsletter.png');
+ expect($template['html'])->stringNotContainsString('mailpoet_logo_newsletter.png');
}
public function testItDoesNotAddMailpoetLogoWhenMSSIsActive() {
@@ -602,7 +602,7 @@ class RendererTest extends \MailPoetTest {
$this->newsletter->setBody(json_decode(Fixtures::get('newsletter_body_template'), true));
$template = $this->renderer->render($this->newsletter);
- expect($template['html'])->notContains('mailpoet_logo_newsletter.png');
+ expect($template['html'])->stringNotContainsString('mailpoet_logo_newsletter.png');
}
public function testItDoesNotAddMailpoetLogoWhenPreviewIsEnabled() {
@@ -611,7 +611,7 @@ class RendererTest extends \MailPoetTest {
$this->newsletter->setBody(json_decode(Fixtures::get('newsletter_body_template'), true));
$template = $this->renderer->renderAsPreview($this->newsletter);
- expect($template['html'])->notContains('mailpoet_logo_newsletter.png');
+ expect($template['html'])->stringNotContainsString('mailpoet_logo_newsletter.png');
}
public function testItAddsMailpoetLogo() {
@@ -620,7 +620,7 @@ class RendererTest extends \MailPoetTest {
$this->license->method('hasLicense')->willReturn(false);
$template = $this->renderer->render($this->newsletter);
- expect($template['html'])->contains('mailpoet_logo_newsletter.png');
+ expect($template['html'])->stringContainsString('mailpoet_logo_newsletter.png');
}
public function testItPostProcessesTemplate() {
diff --git a/tests/integration/Newsletter/ViewInBrowser/ViewInBrowserRendererTest.php b/tests/integration/Newsletter/ViewInBrowser/ViewInBrowserRendererTest.php
index b41ae2c670..d634a45f23 100644
--- a/tests/integration/Newsletter/ViewInBrowser/ViewInBrowserRendererTest.php
+++ b/tests/integration/Newsletter/ViewInBrowser/ViewInBrowserRendererTest.php
@@ -172,8 +172,8 @@ class ViewInBrowserRendererTest extends \MailPoetTest {
$this->subscriber,
$this->sendingTask->queue()
);
- expect($renderedBody)->contains('Hello, First');
- expect($renderedBody)->contains(Router::NAME . '&endpoint=view_in_browser');
+ expect($renderedBody)->stringContainsString('Hello, First');
+ expect($renderedBody)->stringContainsString(Router::NAME . '&endpoint=view_in_browser');
}
public function testItRewritesLinksToRouterEndpointWhenTrackingIsEnabled() {
@@ -186,7 +186,7 @@ class ViewInBrowserRendererTest extends \MailPoetTest {
$this->subscriber,
$queue
);
- expect($renderedBody)->contains(Router::NAME . '&endpoint=track');
+ expect($renderedBody)->stringContainsString(Router::NAME . '&endpoint=track');
}
public function testItConvertsHashedLinksToUrlsWhenPreviewIsEnabledAndNewsletterWasSent() {
@@ -199,8 +199,8 @@ class ViewInBrowserRendererTest extends \MailPoetTest {
$queue
);
// hashed link should be replaced with a URL
- expect($renderedBody)->notContains('[mailpoet_click_data]');
- expect($renderedBody)->contains('');
+ expect($renderedBody)->stringNotContainsString('[mailpoet_click_data]');
+ expect($renderedBody)->stringContainsString('');
}
public function testRemovesOpenTrackingTagWhenPreviewIsEnabledAndNewsletterWasSent() {
@@ -213,8 +213,8 @@ class ViewInBrowserRendererTest extends \MailPoetTest {
$queue
);
// open tracking data tag should be removed
- expect($renderedBody)->notContains('[mailpoet_open_data]');
- expect($renderedBody)->contains('');
+ expect($renderedBody)->stringNotContainsString('[mailpoet_open_data]');
+ expect($renderedBody)->stringContainsString('
');
}
public function _after() {
diff --git a/tests/integration/Router/RouterTest.php b/tests/integration/Router/RouterTest.php
index df492f7691..2ad0e194e2 100644
--- a/tests/integration/Router/RouterTest.php
+++ b/tests/integration/Router/RouterTest.php
@@ -263,6 +263,6 @@ class RouterTest extends \MailPoetTest {
'test',
$data
);
- expect($result)->contains(Router::NAME . '&endpoint=router_test_mock_endpoint&action=test&data=' . $encodedData);
+ expect($result)->stringContainsString(Router::NAME . '&endpoint=router_test_mock_endpoint&action=test&data=' . $encodedData);
}
}
diff --git a/tests/integration/Settings/SettingsControllerTest.php b/tests/integration/Settings/SettingsControllerTest.php
index 569f90ee02..162bb4be10 100644
--- a/tests/integration/Settings/SettingsControllerTest.php
+++ b/tests/integration/Settings/SettingsControllerTest.php
@@ -93,7 +93,7 @@ class SettingsControllerTest extends \MailPoetTest {
$this->controller->set('test_key.key1.key2', 1);
$this->assertEquals(1, $this->controller->get('test_key.key1.key2'));
$this->controller->set('test_key.key1.key2', null);
- $this->assertNull(null, $this->controller->get('test_key.key1.key2'));
+ $this->assertNull($this->controller->get('test_key.key1.key2'));
$dbValue = unserialize($this->getSettingValue('test_key'));
$this->assertNull($dbValue['key1']['key2']);
}
diff --git a/tests/integration/Statistics/GATrackingTest.php b/tests/integration/Statistics/GATrackingTest.php
index d94435253f..b0be840bdd 100644
--- a/tests/integration/Statistics/GATrackingTest.php
+++ b/tests/integration/Statistics/GATrackingTest.php
@@ -66,8 +66,8 @@ class GATrackingTest extends \MailPoetTest {
'ga_campaign' => $this->gaCampaign,
]);
$result = $tracking->applyGATracking($this->renderedNewsletter, $newsletter, $this->internalHost);
- expect($result['text'])->contains('utm_campaign=' . urlencode($this->gaCampaign));
- expect($result['html'])->contains('utm_campaign=' . urlencode($this->gaCampaign));
+ expect($result['text'])->stringContainsString('utm_campaign=' . urlencode($this->gaCampaign));
+ expect($result['html'])->stringContainsString('utm_campaign=' . urlencode($this->gaCampaign));
}
public function testItKeepsShorcodes() {
@@ -76,8 +76,8 @@ class GATrackingTest extends \MailPoetTest {
'ga_campaign' => $this->gaCampaign,
]);
$result = $tracking->applyGATracking($this->renderedNewsletter, $newsletter, $this->internalHost);
- expect($result['text'])->contains('email=[subscriber:email]');
- expect($result['html'])->contains('email=[subscriber:email]');
+ expect($result['text'])->stringContainsString('email=[subscriber:email]');
+ expect($result['html'])->stringContainsString('email=[subscriber:email]');
}
public function _after() {
diff --git a/tests/integration/Statistics/Track/ClicksTest.php b/tests/integration/Statistics/Track/ClicksTest.php
index 4e9d90e09b..221c9f19b0 100644
--- a/tests/integration/Statistics/Track/ClicksTest.php
+++ b/tests/integration/Statistics/Track/ClicksTest.php
@@ -133,7 +133,7 @@ class ClicksTest extends \MailPoetTest {
$this->queue,
$preview = false
);
- expect($link)->contains('&endpoint=view_in_browser');
+ expect($link)->stringContainsString('&endpoint=view_in_browser');
}
public function testItFailsToConvertsInvalidShortcodeToUrl() {
diff --git a/tests/integration/Subscribers/ConfirmationEmailMailerTest.php b/tests/integration/Subscribers/ConfirmationEmailMailerTest.php
index ba35a51e52..801a4c3ddd 100644
--- a/tests/integration/Subscribers/ConfirmationEmailMailerTest.php
+++ b/tests/integration/Subscribers/ConfirmationEmailMailerTest.php
@@ -37,8 +37,8 @@ class ConfirmationEmailMailerTest extends \MailPoetTest {
$mailer = Stub::makeEmpty(Mailer::class, [
'send' =>
Stub\Expected::once(function($email, $subscriber, $extraParams) {
- expect($email['body']['html'])->contains('Test segment');
- expect($email['body']['html'])->contains('I confirm my subscription!');
+ expect($email['body']['html'])->stringContainsString('Test segment');
+ expect($email['body']['html'])->stringContainsString('I confirm my subscription!');
expect($extraParams['meta'])->equals([
'email_type' => 'confirmation',
'subscriber_status' => 'unconfirmed',
diff --git a/tests/integration/Subscribers/ImportExport/Import/MailChimpTest.php b/tests/integration/Subscribers/ImportExport/Import/MailChimpTest.php
index 31e2a59ee3..a4fbce64e3 100644
--- a/tests/integration/Subscribers/ImportExport/Import/MailChimpTest.php
+++ b/tests/integration/Subscribers/ImportExport/Import/MailChimpTest.php
@@ -65,7 +65,7 @@ class MailChimpTest extends \MailPoetTest {
$lists = $mailchimp->getLists();
$this->fail('MailChimp getLists() did not throw an exception');
} catch (\Exception $e) {
- expect($e->getMessage())->contains('Invalid API Key');
+ expect($e->getMessage())->stringContainsString('Invalid API Key');
}
}
@@ -88,14 +88,14 @@ class MailChimpTest extends \MailPoetTest {
$this->mailchimp->getSubscribers();
$this->fail('MailChimp getSubscribers() did not throw an exception');
} catch (\Exception $e) {
- expect($e->getMessage())->contains('Did not find any valid lists');
+ expect($e->getMessage())->stringContainsString('Did not find any valid lists');
}
try {
$this->mailchimp->getSubscribers([12]);
$this->fail('MailChimp getSubscribers() did not throw an exception');
} catch (\Exception $e) {
- expect($e->getMessage())->contains('Did not find any valid lists');
+ expect($e->getMessage())->stringContainsString('Did not find any valid lists');
}
}
@@ -125,7 +125,7 @@ class MailChimpTest extends \MailPoetTest {
$this->fail('MailChimp getSubscribers() did not throw an exception');
} catch (\Exception $e) {
expect($e->getMessage())
- ->contains('The information received from MailChimp is too large for processing');
+ ->stringContainsString('The information received from MailChimp is too large for processing');
}
}
diff --git a/tests/integration/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporterTest.php b/tests/integration/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporterTest.php
index 6dabba6ad6..5b7a586898 100644
--- a/tests/integration/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporterTest.php
+++ b/tests/integration/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporterTest.php
@@ -20,7 +20,7 @@ class NewsletterClicksExporterTest extends \MailPoetTest {
public function testExportWorksWhenSubscriberNotFound() {
$result = $this->exporter->export('email.that@doesnt.exists');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('data');
expect($result['data'])->equals([]);
expect($result)->hasKey('done');
@@ -32,7 +32,7 @@ class NewsletterClicksExporterTest extends \MailPoetTest {
'email' => 'email.that@has.no.newsletters',
]);
$result = $this->exporter->export('email.that@has.no.newsletters');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('data');
expect($result['data'])->equals([]);
expect($result)->hasKey('done');
@@ -67,7 +67,7 @@ class NewsletterClicksExporterTest extends \MailPoetTest {
'created_at' => '2018-01-02 15:16:17',
]);
$result = $this->exporter->export('email@with.clicks');
- expect($result['data'])->internalType('array');
+ expect($result['data'])->array();
expect($result['data'])->count(1);
expect($result['done'])->equals(true);
expect($result['data'][0])->hasKey('group_id');
diff --git a/tests/integration/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporterTest.php b/tests/integration/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporterTest.php
index 5f9e761c04..e66bc37396 100644
--- a/tests/integration/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporterTest.php
+++ b/tests/integration/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporterTest.php
@@ -20,7 +20,7 @@ class NewslettersExporterTest extends \MailPoetTest {
public function testExportWorksWhenSubscriberNotFound() {
$result = $this->exporter->export('email.that@doesnt.exists');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('data');
expect($result['data'])->equals([]);
expect($result)->hasKey('done');
@@ -32,7 +32,7 @@ class NewslettersExporterTest extends \MailPoetTest {
'email' => 'email.that@has.no.newsletters',
]);
$result = $this->exporter->export('email.that@has.no.newsletters');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('data');
expect($result['data'])->equals([]);
expect($result)->hasKey('done');
@@ -54,7 +54,7 @@ class NewslettersExporterTest extends \MailPoetTest {
'queue_id' => $queue->id(),
]]);
$result = $this->exporter->export('user@with.newsletters');
- expect($result['data'])->internalType('array');
+ expect($result['data'])->array();
expect($result['data'])->count(1);
expect($result['done'])->equals(true);
expect($result['data'][0])->hasKey('group_id');
@@ -84,7 +84,7 @@ class NewslettersExporterTest extends \MailPoetTest {
]]);
$result = $this->exporter->export('user1@with.newsletters');
expect($result['data'][0]['data'][3]['name'])->equals('Email preview');
- expect($result['data'][0]['data'][3]['value'])->contains('mailpoet_router&endpoint=view_in_browser&action=view&data=');
+ expect($result['data'][0]['data'][3]['value'])->stringContainsString('mailpoet_router&endpoint=view_in_browser&action=view&data=');
}
public function testExportOpens() {
diff --git a/tests/integration/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporterTest.php b/tests/integration/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporterTest.php
index baee85f8b4..afce7ee44f 100644
--- a/tests/integration/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporterTest.php
+++ b/tests/integration/Subscribers/ImportExport/PersonalDataExporters/SegmentsExporterTest.php
@@ -18,7 +18,7 @@ class SegmentsExporterTest extends \MailPoetTest {
public function testExportWorksWhenSubscriberNotFound() {
$result = $this->exporter->export('email.that@doesnt.exists');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('data');
expect($result['data'])->equals([]);
expect($result)->hasKey('done');
@@ -30,7 +30,7 @@ class SegmentsExporterTest extends \MailPoetTest {
'email' => 'email.that@has.no.segments',
]);
$result = $this->exporter->export('email.that@has.no.segments');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('data');
expect($result['data'])->equals([]);
expect($result)->hasKey('done');
@@ -56,7 +56,7 @@ class SegmentsExporterTest extends \MailPoetTest {
'updated_at' => '2018-05-02 15:26:00',
]);
$result = $this->exporter->export('email.that@has.some.segments');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('data');
expect($result)->hasKey('done');
$expected = [
@@ -81,7 +81,7 @@ class SegmentsExporterTest extends \MailPoetTest {
],
],
];
- expect($result['data'])->internalType('array');
+ expect($result['data'])->array();
expect($result['data'])->count(2);
expect($result['done'])->equals(true);
expect($result['data'][0])->hasKey('group_id');
diff --git a/tests/integration/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporterTest.php b/tests/integration/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporterTest.php
index 0608f69d03..1b590b96b6 100644
--- a/tests/integration/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporterTest.php
+++ b/tests/integration/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporterTest.php
@@ -17,7 +17,7 @@ class SubscriberExporterTest extends \MailPoetTest {
public function testExportWorksWhenSubscriberNotFound() {
$result = $this->exporter->export('email.that@doesnt.exists');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('data');
expect($result['data'])->equals([]);
expect($result)->hasKey('done');
@@ -33,10 +33,10 @@ class SubscriberExporterTest extends \MailPoetTest {
'created_at' => '2018-05-03 10:30:08',
]);
$result = $this->exporter->export('email.that@has.no.custom.fields');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('data');
expect($result)->hasKey('done');
- expect($result['data'])->internalType('array');
+ expect($result['data'])->array();
expect($result['data'])->count(1);
expect($result['done'])->equals(true);
expect($result['data'][0])->hasKey('group_id');
diff --git a/tests/integration/Subscribers/NewSubscriberNotificationMailerTest.php b/tests/integration/Subscribers/NewSubscriberNotificationMailerTest.php
index 1d9ab6ed88..b8b0412431 100644
--- a/tests/integration/Subscribers/NewSubscriberNotificationMailerTest.php
+++ b/tests/integration/Subscribers/NewSubscriberNotificationMailerTest.php
@@ -73,8 +73,8 @@ class NewSubscriberNotificationMailerTest extends \MailPoetTest {
expect($newsletter['body'])->hasKey('html');
expect($newsletter['body'])->hasKey('text');
expect($newsletter['body'])->count(2);
- expect($newsletter['body']['text'])->contains('subscriber@example.com');
- expect($newsletter['body']['html'])->contains('subscriber@example.com');
+ expect($newsletter['body']['text'])->stringContainsString('subscriber@example.com');
+ expect($newsletter['body']['html'])->stringContainsString('subscriber@example.com');
expect($extraParams['meta'])->equals([
'email_type' => 'new_subscriber_notification',
'subscriber_status' => 'unknown',
diff --git a/tests/integration/Subscribers/SubscriberPersonalDataEraserTest.php b/tests/integration/Subscribers/SubscriberPersonalDataEraserTest.php
index 23b18e0f4e..855d9f992c 100644
--- a/tests/integration/Subscribers/SubscriberPersonalDataEraserTest.php
+++ b/tests/integration/Subscribers/SubscriberPersonalDataEraserTest.php
@@ -22,7 +22,7 @@ class SubscriberPersonalDataEraserTest extends \MailPoetTest {
public function testExportWorksWhenSubscriberNotFound() {
$result = $this->eraser->erase('email.that@doesnt.exists');
- expect($result)->internalType('array');
+ expect($result)->array();
expect($result)->hasKey('items_removed');
expect($result['items_removed'])->equals(0);
expect($result)->hasKey('done');
diff --git a/tests/integration/Subscription/ManageSubscriptionFormRendererTest.php b/tests/integration/Subscription/ManageSubscriptionFormRendererTest.php
index e26ade9252..19a4a029da 100644
--- a/tests/integration/Subscription/ManageSubscriptionFormRendererTest.php
+++ b/tests/integration/Subscription/ManageSubscriptionFormRendererTest.php
@@ -22,11 +22,11 @@ class ManageSubscriptionFormRendererTest extends \MailPoetTest {
$subscriber = $this->getSubscriber($this->getSegment());
$form = $this->formRenderer->renderForm(Subscriber::findOne($subscriber->getId()));
expect($form)->regExp('/