Fix Laravel Pint formatting
This commit is contained in:
@@ -15,13 +15,13 @@ class FileServeServiceTest extends TestCase
|
||||
public function test_meta_returns_file_metadata(): void
|
||||
{
|
||||
$dir = storage_path('testing/files');
|
||||
if (!is_dir($dir)) {
|
||||
if (! is_dir($dir)) {
|
||||
mkdir($dir, 0777, true);
|
||||
}
|
||||
$path = $dir . DIRECTORY_SEPARATOR . 'sample.pdf';
|
||||
$path = $dir.DIRECTORY_SEPARATOR.'sample.pdf';
|
||||
file_put_contents($path, 'PDFDATA');
|
||||
|
||||
$service = new FileServeService();
|
||||
$service = new FileServeService;
|
||||
$meta = $service->meta($dir, 'sample.pdf', ['pdf'], 'download');
|
||||
|
||||
$this->assertSame('sample.pdf', $meta['name']);
|
||||
@@ -33,13 +33,13 @@ class FileServeServiceTest extends TestCase
|
||||
public function test_serve_inline_returns_304_when_etag_matches(): void
|
||||
{
|
||||
$dir = storage_path('testing/files');
|
||||
if (!is_dir($dir)) {
|
||||
if (! is_dir($dir)) {
|
||||
mkdir($dir, 0777, true);
|
||||
}
|
||||
$path = $dir . DIRECTORY_SEPARATOR . 'cached.pdf';
|
||||
$path = $dir.DIRECTORY_SEPARATOR.'cached.pdf';
|
||||
file_put_contents($path, 'PDFDATA');
|
||||
|
||||
$service = new FileServeService();
|
||||
$service = new FileServeService;
|
||||
$meta = $service->meta($dir, 'cached.pdf', ['pdf']);
|
||||
|
||||
$request = Request::create('/files/cached.pdf', 'GET', [], [], [], [
|
||||
@@ -57,13 +57,13 @@ class FileServeServiceTest extends TestCase
|
||||
$this->expectException(HttpException::class);
|
||||
|
||||
$dir = storage_path('testing/files');
|
||||
if (!is_dir($dir)) {
|
||||
if (! is_dir($dir)) {
|
||||
mkdir($dir, 0777, true);
|
||||
}
|
||||
$path = $dir . DIRECTORY_SEPARATOR . 'sample.exe';
|
||||
$path = $dir.DIRECTORY_SEPARATOR.'sample.exe';
|
||||
file_put_contents($path, 'DATA');
|
||||
|
||||
$service = new FileServeService();
|
||||
$service = new FileServeService;
|
||||
$service->meta($dir, 'sample.exe', ['pdf']);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user