null, 'access_key' => null, 'secret_key' => null, ]; try { $file = 'minio-local-test-' . bin2hex(random_bytes(4)) . '.pdf'; $store = new pdf_store(); expect($store->createObject($file, 'local-pdf-content'))->toBeTrue(); $path = $store->download($file); expect(is_file($path))->toBeTrue() ->and(file_get_contents($path))->toBe('local-pdf-content'); } finally { if (isset($path) && is_file($path)) { unlink($path); } if ($previousRunApiTests === false) { putenv('RUN_API_TESTS'); } else { putenv('RUN_API_TESTS=' . $previousRunApiTests); } $MINIO = $previousMinio; } });