Add missing this for stubs expecting a number of method calls to work

This commit is contained in:
stoletniy
2017-06-21 19:14:17 +03:00
committed by pavel-mailpoet
parent 0e5401dd68
commit 6ff3895940
5 changed files with 27 additions and 14 deletions

View File

@@ -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);