Memsource-API/tests/projectTest.php

23 lines
545 B
PHP
Raw Permalink Normal View History

<?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');
}
}