diff --git a/mailpoet/tests/integration/Cron/CronHelperTest.php b/mailpoet/tests/integration/Cron/CronHelperTest.php
index 692a9f2652..9b1478e230 100644
--- a/mailpoet/tests/integration/Cron/CronHelperTest.php
+++ b/mailpoet/tests/integration/Cron/CronHelperTest.php
@@ -220,7 +220,7 @@ class CronHelperTest extends \MailPoetTest {
// random token is a string of 5 characters
$token1 = $this->cronHelper->createToken();
$token2 = $this->cronHelper->createToken();
- expect($token1)->notEquals($token2);
+ verify($token1)->notEquals($token2);
verify(is_string($token1))->true();
verify(strlen($token1))->equals(5);
}
diff --git a/mailpoet/tests/integration/Cron/SupervisorTest.php b/mailpoet/tests/integration/Cron/SupervisorTest.php
index f66351a689..136320c6dc 100644
--- a/mailpoet/tests/integration/Cron/SupervisorTest.php
+++ b/mailpoet/tests/integration/Cron/SupervisorTest.php
@@ -60,7 +60,7 @@ class SupervisorTest extends \MailPoetTest {
$this->supervisor->daemon['updated_at'] = time() - $this->cronHelper->getDaemonExecutionTimeout();
$daemon = $this->supervisor->checkDaemon();
verify(is_int($daemon['updated_at']))->true();
- expect($daemon['updated_at'])->notEquals($this->supervisor->daemon['updated_at']);
+ verify($daemon['updated_at'])->notEquals($this->supervisor->daemon['updated_at']);
verify($daemon['status'])->equals(CronHelper::DAEMON_STATUS_ACTIVE);
}
diff --git a/mailpoet/tests/integration/Cron/Workers/SchedulerTest.php b/mailpoet/tests/integration/Cron/Workers/SchedulerTest.php
index aae42c8fe4..23ebf6a929 100644
--- a/mailpoet/tests/integration/Cron/Workers/SchedulerTest.php
+++ b/mailpoet/tests/integration/Cron/Workers/SchedulerTest.php
@@ -157,10 +157,10 @@ class SchedulerTest extends \MailPoetTest {
expect($notificationHistory)->notEmpty();
$this->assertInstanceOf(NewsletterEntity::class, $notificationHistory);
// check the hash of the post notification history
- expect($notificationHistory->getHash())->notEquals($newsletter->getHash());
+ verify($notificationHistory->getHash())->notEquals($newsletter->getHash());
verify(strlen((string)$notificationHistory->getHash()))->equals(Security::HASH_LENGTH);
// check the unsubscribe token of the post notification history
- expect($notificationHistory->getUnsubscribeToken())->notEquals($newsletter->getUnsubscribeToken());
+ verify($notificationHistory->getUnsubscribeToken())->notEquals($newsletter->getUnsubscribeToken());
verify(strlen((string)$notificationHistory->getUnsubscribeToken()))->equals(Security::UNSUBSCRIBE_TOKEN_LENGTH);
verify($notificationHistory->getParent())->equals($newsletter);
@@ -910,7 +910,7 @@ class SchedulerTest extends \MailPoetTest {
$scheduler->process();
$newQueue = $this->scheduledTasksRepository->findOneById($queue->taskId);
$this->assertInstanceOf(ScheduledTaskEntity::class, $newQueue);
- expect($newQueue->getUpdatedAt())->notEquals($originalUpdated);
+ verify($newQueue->getUpdatedAt())->notEquals($originalUpdated);
}
public function _createNewsletterSegment($newsletterId, $segmentId) {
diff --git a/mailpoet/tests/integration/Cron/Workers/SendingQueue/SendingQueueTest.php b/mailpoet/tests/integration/Cron/Workers/SendingQueue/SendingQueueTest.php
index 7e1bd79163..fc6e88100a 100644
--- a/mailpoet/tests/integration/Cron/Workers/SendingQueue/SendingQueueTest.php
+++ b/mailpoet/tests/integration/Cron/Workers/SendingQueue/SendingQueueTest.php
@@ -345,7 +345,7 @@ class SendingQueueTest extends \MailPoetTest {
public function testItDeletesQueueWhenNewsletterIsNotFound() {
// queue exists
$queue = SendingQueue::findOne($this->queue->id);
- expect($queue)->notEquals(false);
+ verify($queue)->notEquals(false);
// delete newsletter
$this->newslettersRepository->bulkDelete([$this->newsletter->id]);
@@ -455,7 +455,7 @@ class SendingQueueTest extends \MailPoetTest {
->where('subscriber_id', $this->subscriber->getId())
->where('queue_id', $this->queue->id)
->findOne();
- expect($statistics)->notEquals(false);
+ verify($statistics)->notEquals(false);
}
public function testItSendCorrectDataToSubscribersOneByOne() {
@@ -583,7 +583,7 @@ class SendingQueueTest extends \MailPoetTest {
->where('subscriber_id', $this->subscriber->getId())
->where('queue_id', $this->queue->id)
->findOne();
- expect($statistics)->notEquals(false);
+ verify($statistics)->notEquals(false);
}
public function testItProcessesStandardNewsletters() {
@@ -632,7 +632,7 @@ class SendingQueueTest extends \MailPoetTest {
->where('subscriber_id', $this->subscriber->getId())
->where('queue_id', $this->queue->id)
->findOne();
- expect($statistics)->notEquals(false);
+ verify($statistics)->notEquals(false);
}
public function testItHandlesSendingErrorCorrectly() {
@@ -737,7 +737,7 @@ class SendingQueueTest extends \MailPoetTest {
$newQueue = ScheduledTask::findOne($this->queue->task_id);
$this->assertInstanceOf(ScheduledTask::class, $newQueue);
- expect($newQueue->updatedAt)->notEquals($originalUpdated);
+ verify($newQueue->updatedAt)->notEquals($originalUpdated);
}
public function testItCanProcessWelcomeNewsletters() {
@@ -789,7 +789,7 @@ class SendingQueueTest extends \MailPoetTest {
->where('subscriber_id', $this->subscriber->getId())
->where('queue_id', $this->queue->id)
->findOne();
- expect($statistics)->notEquals(false);
+ verify($statistics)->notEquals(false);
}
public function testItPreventsSendingWelcomeEmailWhenSubscriberIsUnsubscribed() {
diff --git a/mailpoet/tests/integration/Cron/Workers/SendingQueue/Tasks/NewsletterTest.php b/mailpoet/tests/integration/Cron/Workers/SendingQueue/Tasks/NewsletterTest.php
index 9c96ebdbf7..0b171f8f07 100644
--- a/mailpoet/tests/integration/Cron/Workers/SendingQueue/Tasks/NewsletterTest.php
+++ b/mailpoet/tests/integration/Cron/Workers/SendingQueue/Tasks/NewsletterTest.php
@@ -249,7 +249,7 @@ class NewsletterTest extends \MailPoetTest {
$result = $newsletterTask->preProcessNewsletter($this->newsletter, $this->sendingTask);
$newsletterPost = $newsletterPostRepository->findOneBy(['newsletter' => $this->newsletter->getId()]);
expect($newsletterPost)->isInstanceOf(NewsletterPostEntity::class);
- expect($result)->notEquals(false);
+ verify($result)->notEquals(false);
$this->assertInstanceOf(NewsletterPostEntity::class, $newsletterPost);
verify($newsletterPost->getPostId())->equals('10');
}
@@ -294,7 +294,7 @@ class NewsletterTest extends \MailPoetTest {
$this->newsletterTask->markNewsletterAsSent($newsletter, $this->sendingTask);
$updatedNewsletter = $this->newslettersRepository->findOneById($newsletter->getId());
$this->assertInstanceOf(NewsletterEntity::class, $updatedNewsletter);
- expect($updatedNewsletter->getStatus())->notEquals(NewsletterEntity::STATUS_SENT);
+ verify($updatedNewsletter->getStatus())->notEquals(NewsletterEntity::STATUS_SENT);
}
public function testItDoesNotRenderSubscriberShortcodeInSubjectWhenPreprocessingNewsletter() {
@@ -540,7 +540,7 @@ class NewsletterTest extends \MailPoetTest {
$newsletter->setSubject('Subject 2');
$this->entityManager->persist($newsletter);
$this->entityManager->flush();
- expect($originalCampaignId)->notEquals($this->newsletterTask->calculateCampaignId($newsletter, $renderedNewsletters));
+ verify($originalCampaignId)->notEquals($this->newsletterTask->calculateCampaignId($newsletter, $renderedNewsletters));
}
public function testCampaignIdRevertsIfContentReverts() {
@@ -555,7 +555,7 @@ class NewsletterTest extends \MailPoetTest {
$updatedRenderedNewsletters = [
'text' => 'text body updated',
];
- expect($originalCampaignId)->notEquals($this->newsletterTask->calculateCampaignId($newsletter, $updatedRenderedNewsletters));
+ verify($originalCampaignId)->notEquals($this->newsletterTask->calculateCampaignId($newsletter, $updatedRenderedNewsletters));
$newsletter->setSubject('Subject');
$this->entityManager->persist($newsletter);
$this->entityManager->flush();
@@ -568,7 +568,7 @@ class NewsletterTest extends \MailPoetTest {
$renderedNewsletters = [
'text' => 'text body',
];
- expect($this->newsletterTask->calculateCampaignId($newsletter1, $renderedNewsletters))->notEquals($this->newsletterTask->calculateCampaignId($newsletter2, $renderedNewsletters));
+ verify($this->newsletterTask->calculateCampaignId($newsletter1, $renderedNewsletters))->notEquals($this->newsletterTask->calculateCampaignId($newsletter2, $renderedNewsletters));
}
public function testCampaignIdChangesIfImageChanges() {
@@ -582,7 +582,7 @@ class NewsletterTest extends \MailPoetTest {
'text' => '[alt text] Text',
'html' => '
Text
', ]; - expect($originalCampaignId)->notEquals($this->newsletterTask->calculateCampaignId($newsletter, $renderedNewslettersDifferentImageSrc)); + verify($originalCampaignId)->notEquals($this->newsletterTask->calculateCampaignId($newsletter, $renderedNewslettersDifferentImageSrc)); } public function testPreProcessingSavesFilterSegmentData(): void { diff --git a/mailpoet/tests/integration/Cron/Workers/SubscribersStatsReportTest.php b/mailpoet/tests/integration/Cron/Workers/SubscribersStatsReportTest.php index 2cce32f373..1f1ec73493 100644 --- a/mailpoet/tests/integration/Cron/Workers/SubscribersStatsReportTest.php +++ b/mailpoet/tests/integration/Cron/Workers/SubscribersStatsReportTest.php @@ -111,6 +111,6 @@ class SubscribersStatsReportTest extends \MailPoetTest { expect($result2)->isInstanceOf(Carbon::class); expect($result2->getTimestamp())->greaterThan($time); expect($result2->getTimestamp())->lessThan($time + $maxExpectedScheduleInterval); - expect($result2->getTimestamp())->notEquals($result->getTimestamp()); + verify($result2->getTimestamp())->notEquals($result->getTimestamp()); } } diff --git a/mailpoet/tests/integration/Models/SubscriberTest.php b/mailpoet/tests/integration/Models/SubscriberTest.php index 6275c64998..45235128b7 100644 --- a/mailpoet/tests/integration/Models/SubscriberTest.php +++ b/mailpoet/tests/integration/Models/SubscriberTest.php @@ -104,7 +104,7 @@ class SubscriberTest extends \MailPoetTest { $conflictSubscriber = Subscriber::create(); $conflictSubscriber->hydrate($this->testData); $saved = $conflictSubscriber->save(); - expect($saved)->notEquals(true); + verify($saved)->notEquals(true); } public function testItHasStatusDefaultStatusOfUnconfirmed() { @@ -439,7 +439,7 @@ class SubscriberTest extends \MailPoetTest { verify($record->lastName)->equals($data['last_name']); $record->lastName = 'Mailer'; $result = Subscriber::createOrUpdate($record->asArray()); - expect($result)->notEquals(false); + verify($result)->notEquals(false); expect($result->getValidationErrors())->isEmpty(); $record = Subscriber::where('email', $data['email']) ->findOne(); @@ -596,7 +596,7 @@ class SubscriberTest extends \MailPoetTest { verify($wpSubscriber->trash())->equals(false); $subscriber = Subscriber::findOne($wpSubscriber->id); - expect($subscriber)->notEquals(false); + verify($subscriber)->notEquals(false); verify($subscriber->deletedAt)->equals(null); } @@ -610,7 +610,7 @@ class SubscriberTest extends \MailPoetTest { verify($wpSubscriber->delete())->equals(false); $subscriber = Subscriber::findOne($wpSubscriber->id); - expect($subscriber)->notEquals(false); + verify($subscriber)->notEquals(false); } public function testItCannotTrashWooCommerceCustomer() { @@ -623,7 +623,7 @@ class SubscriberTest extends \MailPoetTest { verify($wpSubscriber->trash())->equals(false); $subscriber = Subscriber::findOne($wpSubscriber->id); - expect($subscriber)->notEquals(false); + verify($subscriber)->notEquals(false); verify($subscriber->deletedAt)->equals(null); } @@ -637,7 +637,7 @@ class SubscriberTest extends \MailPoetTest { verify($wpSubscriber->delete())->equals(false); $subscriber = Subscriber::findOne($wpSubscriber->id); - expect($subscriber)->notEquals(false); + verify($subscriber)->notEquals(false); } public function testItCanDeleteCustomFieldRelations() { diff --git a/mailpoet/tests/integration/Newsletter/NewsletterSaveControllerTest.php b/mailpoet/tests/integration/Newsletter/NewsletterSaveControllerTest.php index cdf18c46b7..e4d52b1fed 100644 --- a/mailpoet/tests/integration/Newsletter/NewsletterSaveControllerTest.php +++ b/mailpoet/tests/integration/Newsletter/NewsletterSaveControllerTest.php @@ -170,7 +170,7 @@ class NewsletterSaveControllerTest extends \MailPoetTest { $optionField = $newsletterOption->getOptionField(); return $optionField && $optionField->getName() === 'schedule'; })->first(); - expect($task1->getScheduledAt())->notEquals($currentTime); + verify($task1->getScheduledAt())->notEquals($currentTime); $this->assertInstanceOf(NewsletterOptionEntity::class, $scheduleOption); // PHPStan verify($task1->getScheduledAt())->equals($this->scheduler->getNextRunDate($scheduleOption->getValue())); @@ -310,7 +310,7 @@ class NewsletterSaveControllerTest extends \MailPoetTest { verify($duplicate->getSubject())->equals('Copy of ' . $newsletter->getSubject()); expect($duplicate->getHash())->string(); expect($duplicate->getHash())->notEmpty(); - expect($duplicate->getHash())->notEquals($newsletter->getHash()); + verify($duplicate->getHash())->notEquals($newsletter->getHash()); verify($duplicate->getBody())->equals($newsletter->getBody()); verify($duplicate->getStatus())->equals(NewsletterEntity::STATUS_DRAFT); } @@ -322,7 +322,7 @@ class NewsletterSaveControllerTest extends \MailPoetTest { $newsletter->setWpPostId($postId); $this->entityManager->flush(); $duplicate = $this->saveController->duplicate($newsletter); - expect($duplicate->getWpPostId())->notEquals($postId); + verify($duplicate->getWpPostId())->notEquals($postId); $post = $wp->getPost($duplicate->getWpPostId()); verify($post->post_content)->equals('newsletter content'); // @phpcs:ignore Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps } diff --git a/mailpoet/tests/integration/Segments/DynamicSegments/SegmentSaveControllerTest.php b/mailpoet/tests/integration/Segments/DynamicSegments/SegmentSaveControllerTest.php index 3ad6984540..b105e9e154 100644 --- a/mailpoet/tests/integration/Segments/DynamicSegments/SegmentSaveControllerTest.php +++ b/mailpoet/tests/integration/Segments/DynamicSegments/SegmentSaveControllerTest.php @@ -118,7 +118,7 @@ class SegmentSaveControllerTest extends \MailPoetTest { $this->addDynamicFilter($segment, ['editor']); $duplicate = $this->saveController->duplicate($segment); - expect($duplicate->getId())->notEquals($segment->getId()); + verify($duplicate->getId())->notEquals($segment->getId()); $filters = $duplicate->getDynamicFilters(); expect($filters)->count(2); @@ -128,7 +128,7 @@ class SegmentSaveControllerTest extends \MailPoetTest { $this->assertInstanceOf(DynamicSegmentFilterEntity::class, $originalFilter1); $this->assertInstanceOf(DynamicSegmentFilterEntity::class, $duplicateFilter1); - expect($originalFilter1->getId())->notEquals($duplicateFilter1->getId()); + verify($originalFilter1->getId())->notEquals($duplicateFilter1->getId()); verify($duplicateFilter1->getFilterData()->getAction())->equals(UserRole::TYPE); verify($duplicateFilter1->getFilterData()->getParam('wordpressRole'))->equals(['administrator']); verify($duplicateFilter1->getFilterData()->getParam('connect'))->equals(DynamicSegmentFilterData::CONNECT_TYPE_AND); @@ -139,7 +139,7 @@ class SegmentSaveControllerTest extends \MailPoetTest { $this->assertInstanceOf(DynamicSegmentFilterEntity::class, $originalFilter2); $this->assertInstanceOf(DynamicSegmentFilterEntity::class, $duplicateFilter2); - expect($originalFilter2->getId())->notEquals($duplicateFilter2->getId()); + verify($originalFilter2->getId())->notEquals($duplicateFilter2->getId()); verify($duplicateFilter2->getFilterData()->getAction())->equals(UserRole::TYPE); verify($duplicateFilter2->getFilterData()->getParam('wordpressRole'))->equals(['editor']); verify($duplicateFilter2->getFilterData()->getParam('connect'))->equals(DynamicSegmentFilterData::CONNECT_TYPE_AND); diff --git a/mailpoet/tests/integration/Services/BridgeTest.php b/mailpoet/tests/integration/Services/BridgeTest.php index 10649d7dd7..c6ec03aca8 100644 --- a/mailpoet/tests/integration/Services/BridgeTest.php +++ b/mailpoet/tests/integration/Services/BridgeTest.php @@ -130,8 +130,8 @@ class BridgeTest extends \MailPoetTest { ]; foreach ($states as $state) { $this->bridge->storeMSSKeyAndState($this->validKey, $state); - expect($this->getMSSKey())->notEquals($this->validKey); - expect($this->getMSSKeyState())->notEquals($state); + verify($this->getMSSKey())->notEquals($this->validKey); + verify($this->getMSSKeyState())->notEquals($state); } } @@ -196,8 +196,8 @@ class BridgeTest extends \MailPoetTest { ]; foreach ($states as $state) { $this->bridge->storePremiumKeyAndState($this->validKey, $state); - expect($this->getPremiumKey())->notEquals($this->validKey); - expect($this->getPremiumKeyState())->notEquals($state); + verify($this->getPremiumKey())->notEquals($this->validKey); + verify($this->getPremiumKeyState())->notEquals($state); } } @@ -216,9 +216,9 @@ class BridgeTest extends \MailPoetTest { public function testItDoesNotStoreInvalidSubscriptionType() { $state = ['state' => Bridge::KEY_VALID, 'data' => ['subscription_type' => 'INVALID']]; $this->bridge->storePremiumKeyAndState($this->validKey, $state); - expect($this->getSubscriptionType())->notEquals('INVALID'); + verify($this->getSubscriptionType())->notEquals('INVALID'); $this->bridge->storeMSSKeyAndState($this->validKey, $state); - expect($this->getSubscriptionType())->notEquals('INVALID'); + verify($this->getSubscriptionType())->notEquals('INVALID'); } public function testItInvalidatesMSSKey() { diff --git a/mailpoet/tests/integration/Statistics/GATrackingTest.php b/mailpoet/tests/integration/Statistics/GATrackingTest.php index 3559de4c0c..b023c35199 100644 --- a/mailpoet/tests/integration/Statistics/GATrackingTest.php +++ b/mailpoet/tests/integration/Statistics/GATrackingTest.php @@ -45,7 +45,7 @@ class GATrackingTest extends \MailPoetTest { // Process (filled GA campaign) $result = $this->tracking->applyGATracking($this->renderedNewsletter, $this->newsletter, $this->internalHost); - expect($result)->notEquals($this->renderedNewsletter); + verify($result)->notEquals($this->renderedNewsletter); } public function testItGetsGACampaignFromParentNewsletterForPostNotifications() { @@ -55,7 +55,7 @@ class GATrackingTest extends \MailPoetTest { ->create(); $result = $this->tracking->applyGATracking($this->renderedNewsletter, $notificationHistory, $this->internalHost); - expect($result)->notEquals($this->renderedNewsletter); + verify($result)->notEquals($this->renderedNewsletter); } public function testItCanAddGAParamsToLinks() { diff --git a/mailpoet/tests/integration/Subscribers/ConfirmationEmailCustomizerTest.php b/mailpoet/tests/integration/Subscribers/ConfirmationEmailCustomizerTest.php index 3e6a971d87..dd4c98058a 100644 --- a/mailpoet/tests/integration/Subscribers/ConfirmationEmailCustomizerTest.php +++ b/mailpoet/tests/integration/Subscribers/ConfirmationEmailCustomizerTest.php @@ -28,7 +28,7 @@ class ConfirmationEmailCustomizerTest extends \MailPoetTest { verify($this->settings->get(ConfirmationEmailCustomizer::SETTING_EMAIL_ID, false))->equals(false); $controller->init(); - expect($this->settings->get(ConfirmationEmailCustomizer::SETTING_EMAIL_ID, false))->notEquals(false); + verify($this->settings->get(ConfirmationEmailCustomizer::SETTING_EMAIL_ID, false))->notEquals(false); } public function testItGenerateNewsletterIfNoneExist() { @@ -39,7 +39,7 @@ class ConfirmationEmailCustomizerTest extends \MailPoetTest { expect($newsletter)->isInstanceOf(NewsletterEntity::class); - expect($this->settings->get(ConfirmationEmailCustomizer::SETTING_EMAIL_ID, false))->notEquals(false); + verify($this->settings->get(ConfirmationEmailCustomizer::SETTING_EMAIL_ID, false))->notEquals(false); } public function testItRegenerateNewsletterIfIdIsSetButNewsletterDoesNotExist() { @@ -50,7 +50,7 @@ class ConfirmationEmailCustomizerTest extends \MailPoetTest { expect($newsletter)->isInstanceOf(NewsletterEntity::class); - expect($newsletter->getId())->notEquals(5); + verify($newsletter->getId())->notEquals(5); verify($this->settings->get(ConfirmationEmailCustomizer::SETTING_EMAIL_ID, false))->equals($newsletter->getId()); } diff --git a/mailpoet/tests/integration/Subscribers/ImportExport/Import/ImportTest.php b/mailpoet/tests/integration/Subscribers/ImportExport/Import/ImportTest.php index 024b9c9cd7..28f02e0ca0 100644 --- a/mailpoet/tests/integration/Subscribers/ImportExport/Import/ImportTest.php +++ b/mailpoet/tests/integration/Subscribers/ImportExport/Import/ImportTest.php @@ -717,7 +717,7 @@ class ImportTest extends \MailPoetTest { $imported = $this->subscriberRepository->findOneBy(['email' => 'mary@jane.com']); $this->assertInstanceOf(SubscriberEntity::class, $imported); verify($imported->getFirstName())->equals($beforeImport->getFirstName()); // Subscriber name was synchronized from WP - expect($imported->getFirstName())->notEquals('Mary'); + verify($imported->getFirstName())->notEquals('Mary'); $this->tester->deleteWordPressUser('mary@jane.com'); } diff --git a/mailpoet/tests/integration/Subscribers/SubscriberActionsTest.php b/mailpoet/tests/integration/Subscribers/SubscriberActionsTest.php index db5e209619..43a24c25f9 100644 --- a/mailpoet/tests/integration/Subscribers/SubscriberActionsTest.php +++ b/mailpoet/tests/integration/Subscribers/SubscriberActionsTest.php @@ -142,7 +142,7 @@ class SubscriberActionsTest extends \MailPoetTest { ); verify($subscriber->getId() > 0)->equals(true); - expect($subscriber->getId())->notEquals(1337); + verify($subscriber->getId())->notEquals(1337); expect($subscriber->getSegments())->count(1); verify($subscriber->getEmail())->equals('donald@mailpoet.com'); verify($subscriber->getFirstName())->equals('Donald'); @@ -153,8 +153,8 @@ class SubscriberActionsTest extends \MailPoetTest { verify($subscriber->getWpUserId())->null(); verify($subscriber->getIsWoocommerceUser())->equals(0); verify($subscriber->getStatus())->equals(SubscriberEntity::STATUS_UNCONFIRMED); - expect($createdAt->format('Y-m-d H:i:s'))->notEquals('1984-03-09 00:00:01'); - expect($subscriber->getUpdatedAt()->format('Y-m-d H:i:s'))->notEquals('1984-03-09 00:00:02'); + verify($createdAt->format('Y-m-d H:i:s'))->notEquals('1984-03-09 00:00:01'); + verify($subscriber->getUpdatedAt()->format('Y-m-d H:i:s'))->notEquals('1984-03-09 00:00:02'); verify($createdAt->getTimestamp())->equals($subscriber->getUpdatedAt()->getTimestamp(), 2); verify($subscriber->getDeletedAt())->null(); } diff --git a/mailpoet/tests/integration/Subscribers/SubscriberPersonalDataEraserTest.php b/mailpoet/tests/integration/Subscribers/SubscriberPersonalDataEraserTest.php index 3623b82efb..6d298586d1 100644 --- a/mailpoet/tests/integration/Subscribers/SubscriberPersonalDataEraserTest.php +++ b/mailpoet/tests/integration/Subscribers/SubscriberPersonalDataEraserTest.php @@ -96,6 +96,6 @@ class SubscriberPersonalDataEraserTest extends \MailPoetTest { $this->eraser->erase('subscriber@for.anon.test'); $subscriberAfter = $this->subscribersRepository->findOneById($subscriber->getId()); $this->assertInstanceOf(SubscriberEntity::class, $subscriberAfter); - expect($subscriberAfter->getEmail())->notEquals('subscriber@for.anon.test'); + verify($subscriberAfter->getEmail())->notEquals('subscriber@for.anon.test'); } } diff --git a/mailpoet/tests/integration/Subscription/Captcha/CaptchaRendererTest.php b/mailpoet/tests/integration/Subscription/Captcha/CaptchaRendererTest.php index 9fb9f04358..f775007463 100644 --- a/mailpoet/tests/integration/Subscription/Captcha/CaptchaRendererTest.php +++ b/mailpoet/tests/integration/Subscription/Captcha/CaptchaRendererTest.php @@ -50,8 +50,8 @@ class CaptchaRendererTest extends \MailPoetTest { $firstCaptcha = $this->session->getCaptchaHash(); $secondImage = $this->testee->renderImage(null, null, $sessionId, true); $secondCaptcha = $this->session->getCaptchaHash(); - expect($secondImage)->notEquals($firstImage); - expect($firstCaptcha['phrase'])->notEquals($secondCaptcha['phrase']); + verify($secondImage)->notEquals($firstImage); + verify($firstCaptcha['phrase'])->notEquals($secondCaptcha['phrase']); } /** @@ -64,8 +64,8 @@ class CaptchaRendererTest extends \MailPoetTest { $firstCaptcha = $this->session->getCaptchaHash(); $secondAudio = $this->testee->renderAudio($sessionId, true); $secondCaptcha = $this->session->getCaptchaHash(); - expect($fistAudio)->notEquals($secondAudio); - expect($firstCaptcha['phrase'])->notEquals($secondCaptcha['phrase']); + verify($fistAudio)->notEquals($secondAudio); + verify($firstCaptcha['phrase'])->notEquals($secondCaptcha['phrase']); } /** diff --git a/mailpoet/tests/integration/Subscription/PagesTest.php b/mailpoet/tests/integration/Subscription/PagesTest.php index 76142dfc64..652b95488e 100644 --- a/mailpoet/tests/integration/Subscription/PagesTest.php +++ b/mailpoet/tests/integration/Subscription/PagesTest.php @@ -236,7 +236,7 @@ class PagesTest extends \MailPoetTest { $updatedSubscriber = $this->subscribersRepository->findOneById($this->subscriber->getId()); $this->assertInstanceOf(SubscriberEntity::class, $updatedSubscriber); - expect($updatedSubscriber->getStatus())->notEquals(SubscriberEntity::STATUS_UNSUBSCRIBED); + verify($updatedSubscriber->getStatus())->notEquals(SubscriberEntity::STATUS_UNSUBSCRIBED); } public function testItUnsubscribesAndTracksCorrectMethod() { diff --git a/mailpoet/tests/unit/Form/BlockStylesRendererTest.php b/mailpoet/tests/unit/Form/BlockStylesRendererTest.php index 364a817490..9a4f2d0311 100644 --- a/mailpoet/tests/unit/Form/BlockStylesRendererTest.php +++ b/mailpoet/tests/unit/Form/BlockStylesRendererTest.php @@ -107,7 +107,7 @@ class BlockStylesRendererTest extends \MailPoetUnitTest { public function testItShouldRenderPlaceholderStyles() { verify($this->renderer->renderPlaceholderStyles([], 'input'))->equals(''); verify($this->renderer->renderPlaceholderStyles(['params' => ['label_within' => '1']], 'input'))->equals(''); - expect($this->renderer->renderPlaceholderStyles([ + verify($this->renderer->renderPlaceholderStyles([ 'params' => ['label_within' => '1'], 'styles' => ['font_color' => 'red'], ], 'input'))->notEquals(''); diff --git a/mailpoet/tests/unit/Form/DisplayFormInWPContentTest.php b/mailpoet/tests/unit/Form/DisplayFormInWPContentTest.php index 68d1e7f9a9..5d1362b8e7 100644 --- a/mailpoet/tests/unit/Form/DisplayFormInWPContentTest.php +++ b/mailpoet/tests/unit/Form/DisplayFormInWPContentTest.php @@ -90,7 +90,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); } @@ -109,7 +109,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->any())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); $result2 = $this->hook->contentDisplay('content'); @@ -133,7 +133,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); } @@ -160,7 +160,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); } @@ -188,7 +188,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); } @@ -217,7 +217,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); } @@ -246,7 +246,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); } @@ -268,7 +268,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); } @@ -367,7 +367,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); } @@ -398,7 +398,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $form->setBody([['type' => 'submit', 'params' => ['label' => 'Subscribe!'], 'id' => 'submit', 'name' => 'Submit']]); $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($renderedForm); } @@ -489,7 +489,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($formHtml); } @@ -540,7 +540,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($formHtml); } @@ -864,7 +864,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $this->repository->expects($this->once())->method('findBy')->willReturn([$form]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($formHtml); } @@ -890,7 +890,7 @@ class DisplayFormInWPContentTest extends \MailPoetUnitTest { $this->repository->expects($this->once())->method('findBy')->willReturn([$form1, $form2]); $result = $this->hook->contentDisplay('content'); - expect($result)->notEquals('content'); + verify($result)->notEquals('content'); expect($result)->endsWith($formHtml); } diff --git a/mailpoet/tests/unit/Util/PQueryTest.php b/mailpoet/tests/unit/Util/PQueryTest.php index 295ad95e9f..db8236d935 100644 --- a/mailpoet/tests/unit/Util/PQueryTest.php +++ b/mailpoet/tests/unit/Util/PQueryTest.php @@ -60,7 +60,7 @@ class PQueryTest extends \MailPoetUnitTest { if ($equals) { verify($parsedHtml)->equals($html); } else { - expect($parsedHtml)->notEquals($html); + verify($parsedHtml)->notEquals($html); } } } diff --git a/mailpoet/tests/unit/Util/SecurityTest.php b/mailpoet/tests/unit/Util/SecurityTest.php index efde9ccb99..dfaf84bb9a 100644 --- a/mailpoet/tests/unit/Util/SecurityTest.php +++ b/mailpoet/tests/unit/Util/SecurityTest.php @@ -26,7 +26,7 @@ class SecurityTest extends \MailPoetUnitTest { public function testItGeneratesRandomHash() { $hash1 = Security::generateHash(); $hash2 = Security::generateHash(); - expect($hash1)->notEquals($hash2); + verify($hash1)->notEquals($hash2); verify(strlen($hash1))->equals(Security::HASH_LENGTH); }