Files
piratepoet/tests/integration/API/APITest.php
Jan Jakeš 1b5b9d89ff Autofix namespace declaration spacing
[MAILPOET-2409]
2019-10-01 14:29:30 +01:00

22 lines
494 B
PHP

<?php
namespace MailPoet\Test\API;
use MailPoet\API\API;
class APITest extends \MailPoetTest {
function testItCallsMPAPI() {
expect(API::MP('v1'))->isInstanceOf('MailPoet\API\MP\v1\API');
}
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.');
}
}
}