commerceleague /
magento2-module-activecampaign
| 1 | <?php |
||
| 2 | /** |
||
| 3 | */ |
||
| 4 | |||
| 5 | namespace CommerceLeague\ActiveCampaign\Test\Unit\Gateway; |
||
| 6 | |||
| 7 | use CommerceLeague\ActiveCampaign\Gateway\Client; |
||
| 8 | use CommerceLeague\ActiveCampaign\Helper\Config as ConfigHelper; |
||
| 9 | use PHPUnit\Framework\MockObject\MockObject; |
||
| 10 | use PHPUnit\Framework\TestCase; |
||
| 11 | |||
| 12 | class ClientTest extends TestCase |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var MockObject|ConfigHelper |
||
| 16 | */ |
||
| 17 | protected $configHelper; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var Client |
||
| 21 | */ |
||
| 22 | protected $client; |
||
| 23 | |||
| 24 | protected function setUp() |
||
| 25 | { |
||
| 26 | $this->configHelper = $this->createMock(ConfigHelper::class); |
||
| 27 | $this->client = new Client($this->configHelper); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function testGetCommonClient() |
||
| 31 | { |
||
| 32 | $this->configHelper->expects($this->once()) |
||
|
0 ignored issues
–
show
|
|||
| 33 | ->method('getApiUrl') |
||
| 34 | ->willReturn('http://example.com'); |
||
| 35 | |||
| 36 | $this->configHelper->expects($this->once()) |
||
| 37 | ->method('getApiToken') |
||
| 38 | ->willReturn('API_TOKEN'); |
||
| 39 | |||
| 40 | $this->client->getAbandonedCartApi(); |
||
| 41 | } |
||
| 42 | } |
||
| 43 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.