CloudConvert\tests\ProcessTest::testIfDownloadOfOutputFileWorks PHP Метод

testIfDownloadOfOutputFileWorks() публичный Метод

Test if download of output file works
    public function testIfDownloadOfOutputFileWorks()
    {
        $process = $this->api->createProcess(['inputformat' => 'png', 'outputformat' => 'pdf']);
        $process->start(['input' => 'upload', 'outputformat' => 'pdf', 'wait' => true, 'file' => fopen(__DIR__ . '/input.png', 'r')])->download(__DIR__ . '/output.pdf');
        $this->assertFileExists(__DIR__ . '/output.pdf');
        // cleanup
        $process->delete();
        @unlink(__DIR__ . '/output.pdf');
    }