Memsource-API/tests/projectTest.php

22 lines
543 B
PHP
Raw 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('fakeToken');
$this->expectException(\Exception::class);
$api->project()->list();
}
public function testInvalidProjectUidShouldThrowError()
{
$api = new Memsource('fakeToken');
$this->expectException(\Exception::class);
$api->project()->get('invalidProjectUid');
}
}