mirror of
https://github.com/brunofontes/Memsource-API.git
synced 2025-11-17 02:30:54 -03:00
Including Tests and verifications for errors
This commit is contained in:
21
tests/projectTest.php
Normal file
21
tests/projectTest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user