Files
piratepoet/tests/integration/API/APITest.php
Amine Ben hammou 43df66d162 Add public keyword to methods
[MAILPOET-2413]
2019-12-26 18:09:45 +03:00

22 lines
508 B
PHP

<?php
namespace MailPoet\Test\API;
use MailPoet\API\API;
class APITest extends \MailPoetTest {
public function testItCallsMPAPI() {
expect(API::MP('v1'))->isInstanceOf('MailPoet\API\MP\v1\API');
}
public function testItThrowsErrorWhenWrongMPAPIVersionIsCalled() {
try {
API::MP('invalid_version');
$this->fail('Incorrect API version exception should have been thrown.');
} catch (\Exception $e) {
expect($e->getMessage())->equals('Invalid API version.');
}
}
}