2019-06-27 23:03:10 +00:00
|
|
|
<?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', []);
|
|
|
|
}
|
2021-02-12 22:02:25 +00:00
|
|
|
|
|
|
|
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')
|
|
|
|
);
|
|
|
|
}
|
2019-06-27 23:03:10 +00:00
|
|
|
}
|