mirror of
https://github.com/brunofontes/Memsource-API.git
synced 2024-11-23 19:00:50 +00:00
Bruno Fontes
dc437d7044
The test was to make sure it would return a error on No token, but it was providing a token. More than that, it were a simple and direct check if it were throwing an error. Now it is checking for the specific Missing Access Token error message.
23 lines
545 B
PHP
23 lines
545 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use BrunoFontes\Memsource;
|
|
|
|
final class ProjectTest extends TestCase
|
|
{
|
|
public function testNoTokenShouldThrowError()
|
|
{
|
|
$api = new Memsource();
|
|
$this->expectExceptionMessage('Missing Access Token');
|
|
$api->project()->list();
|
|
}
|
|
|
|
public function testInvalidProjectUidShouldThrowError()
|
|
{
|
|
$api = new Memsource('fakeToken');
|
|
$this->expectException(\Exception::class);
|
|
$api->project()->get('invalidProjectUid');
|
|
}
|
|
}
|