mirror of
https://github.com/brunofontes/Memsource-API.git
synced 2024-11-24 03:07:10 +00:00
34 lines
865 B
PHP
34 lines
865 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use BrunoFontes\Memsource;
|
|
|
|
final class JobsTest extends TestCase
|
|
{
|
|
public function testInvalidProjectUidShouldThrowError()
|
|
{
|
|
$api = new Memsource('fakeToken');
|
|
$this->expectException(\Exception::class);
|
|
$api->jobs()->list('invalidProjectUid', []);
|
|
}
|
|
|
|
public function testDownloadTargetFileReturnsNull()
|
|
{
|
|
$api = new Memsource('fakeToken');
|
|
$this->assertEquals(
|
|
null,
|
|
$api->jobs()->downloadTargetFile('projUid', 'jobUid', 'filename.xliff')
|
|
);
|
|
}
|
|
|
|
public function testDownloadOriginalFileReturnsNull()
|
|
{
|
|
$api = new Memsource('fakeToken');
|
|
$this->assertEquals(
|
|
null,
|
|
$api->jobs()->downloadOriginalFile('projUid', 'jobUid', 'filename.xliff')
|
|
);
|
|
}
|
|
}
|