Specify types for mocks [MAILPOET-2488]

This commit is contained in:
wxa
2019-12-25 14:10:48 +03:00
committed by amine-mp
parent dec7bc24a5
commit 176aba69fe
12 changed files with 35 additions and 7 deletions

View File

@ -9,6 +9,7 @@ use MailPoet\Mailer\Mailer;
use MailPoet\Services\Bridge;
use MailPoet\Settings\SettingsController;
use MailPoet\Settings\SettingsRepository;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
class SendingServiceKeyCheckTest extends \MailPoetTest {
public $worker;
@ -27,7 +28,8 @@ class SendingServiceKeyCheckTest extends \MailPoetTest {
public function testItChecksMSSKey() {
$response = ['code' => Bridge::KEY_VALID];
$this->worker->bridge = Stub::make(
/** @var MockObject $bridge */
$bridge = Stub::make(
new Bridge,
[
'checkMSSKey' => $response,
@ -36,6 +38,7 @@ class SendingServiceKeyCheckTest extends \MailPoetTest {
],
$this
);
$this->worker->bridge = $bridge;
$this->worker->bridge->expects($this->once())
->method('checkMSSKey')
->with($this->equalTo($this->mss_key));