Files
piratepoet/tests/integration/API/APITest.php
Jan Jakeš b39dac75d6 Autofix number of newlines between methods
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00

21 lines
507 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.');
}
}
}