diff --git a/tests/unit/Config/InstallerTest.php b/tests/unit/Config/InstallerTest.php index 0307a63a98..e012973bb1 100644 --- a/tests/unit/Config/InstallerTest.php +++ b/tests/unit/Config/InstallerTest.php @@ -18,7 +18,8 @@ class InstallerTest extends MailPoetTest { $this->installer, array( 'getPluginInformation' => Stub::once() - ) + ), + $this ); $installer->init(); apply_filters('plugins_api', null, null, null); @@ -51,7 +52,8 @@ class InstallerTest extends MailPoetTest { $obj->package = $obj->download_link; return $obj; } - ) + ), + $this ); $result = $installer->getPluginInformation(false, 'plugin_information', $args); expect($result->slug)->equals($this->slug); diff --git a/tests/unit/Config/RendererTest.php b/tests/unit/Config/RendererTest.php index 8d464016cb..7ea27a0535 100644 --- a/tests/unit/Config/RendererTest.php +++ b/tests/unit/Config/RendererTest.php @@ -50,7 +50,8 @@ class RendererTest extends MailPoetTest { 'renderer' => Stub::makeEmpty('Twig_Environment', array( 'render' => Stub::atLeastOnce(function() { return 'test render'; }), - ) + ), + $this ), ) ); @@ -69,7 +70,8 @@ class RendererTest extends MailPoetTest { 'render' => Stub::atLeastOnce(function() use ($exception_message) { throw new \RuntimeException($exception_message); }), - ) + ), + $this ), ) ); diff --git a/tests/unit/Config/UpdaterTest.php b/tests/unit/Config/UpdaterTest.php index d4098d6af9..278e7bf991 100644 --- a/tests/unit/Config/UpdaterTest.php +++ b/tests/unit/Config/UpdaterTest.php @@ -21,7 +21,8 @@ class UpdaterTest extends MailPoetTest { $this->updater, array( 'checkForUpdate' => Stub::once() - ) + ), + $this ); $updater->init(); apply_filters('pre_set_site_transient_update_plugins', null); @@ -48,7 +49,8 @@ class UpdaterTest extends MailPoetTest { 'package' => home_url() . '/wp-content/uploads/mailpoet-premium.zip' ); } - ) + ), + $this ); $result = $updater->checkForUpdate($update_transient); expect($result->last_checked)->greaterOrEquals($update_transient->last_checked); diff --git a/tests/unit/Cron/Workers/SendingQueue/SendingQueueTest.php b/tests/unit/Cron/Workers/SendingQueue/SendingQueueTest.php index 1cec03b00f..b4d03e0741 100644 --- a/tests/unit/Cron/Workers/SendingQueue/SendingQueueTest.php +++ b/tests/unit/Cron/Workers/SendingQueue/SendingQueueTest.php @@ -220,7 +220,8 @@ class SendingQueueTest extends MailPoetTest { expect($extra_params['unsubscribe_url'])->equals($directUnsubscribeURL); return true; }) - ) + ), + $this ) ); $sending_queue_worker->process(); @@ -239,7 +240,8 @@ class SendingQueueTest extends MailPoetTest { expect($extra_params['unsubscribe_url'])->equals($trackedUnsubscribeURL); return true; }) - ) + ), + $this ) ); $sending_queue_worker->process(); @@ -257,7 +259,8 @@ class SendingQueueTest extends MailPoetTest { expect(!empty($newsletter['body']['text']))->true(); return true; }) - ) + ), + $this ) ); $sending_queue_worker->process(); @@ -303,7 +306,8 @@ class SendingQueueTest extends MailPoetTest { return true; }), 'getProcessingMethod' => Stub::exactly(1, function() { return 'bulk'; }) - ) + ), + $this ) ); $sending_queue_worker->process(); @@ -351,7 +355,8 @@ class SendingQueueTest extends MailPoetTest { expect(!empty($newsletter['body']['text']))->true(); return true; }) - ) + ), + $this ) ); $sending_queue_worker->process(); @@ -400,7 +405,8 @@ class SendingQueueTest extends MailPoetTest { $sending_queue_worker = $this->sending_queue_worker; $sending_queue_worker->mailer_task = Stub::make( new MailerTask(), - array('send' => Stub::exactly(1, function($newsletter, $subscriber) { return true; })) + array('send' => Stub::exactly(1, function($newsletter, $subscriber) { return true; })), + $this ); $sending_queue_worker->process(); @@ -438,7 +444,7 @@ class SendingQueueTest extends MailPoetTest { $sending_queue_worker = $this->sending_queue_worker; $sending_queue_worker->mailer_task = Stub::make( new MailerTask(), - array('send' => Stub::exactly(1, function($newsletter, $subscriber) { return true; })) + array('send' => function($newsletter, $subscriber) { return true; }) ); $sending_queue_worker->process(); diff --git a/tests/unit/Cron/Workers/SendingQueue/Tasks/MailerTest.php b/tests/unit/Cron/Workers/SendingQueue/Tasks/MailerTest.php index 59cf56cc78..bd3806fca0 100644 --- a/tests/unit/Cron/Workers/SendingQueue/Tasks/MailerTest.php +++ b/tests/unit/Cron/Workers/SendingQueue/Tasks/MailerTest.php @@ -107,7 +107,8 @@ class MailerTaskTest extends MailPoetTest { (object)array( 'mailer_instance' => Stub::make( $php_mail_class, - array('send' => Stub::exactly(1, function($newsletter, $subscriber) { return true; })) + array('send' => Stub::exactly(1, function($newsletter, $subscriber) { return true; })), + $this ) ) );