@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | |
| 11 | 11 | class StreamsTest extends TestCase |
| 12 | 12 | { |
| 13 | - private const FIXTURE_DIRECTORY = __DIR__ . '/fixtures'; |
|
| 13 | + private const FIXTURE_DIRECTORY = __DIR__.'/fixtures'; |
|
| 14 | 14 | |
| 15 | 15 | public function setUp(): void |
| 16 | 16 | { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $this->assertSame(strlen('sample text'), filesize($filename)); |
| 36 | 36 | $this->assertSame(md5('sample text'), md5_file($filename)); |
| 37 | 37 | |
| 38 | - $newFilename = self::FIXTURE_DIRECTORY . '/test.txt'; |
|
| 38 | + $newFilename = self::FIXTURE_DIRECTORY.'/test.txt'; |
|
| 39 | 39 | copy($filename, $newFilename); |
| 40 | 40 | |
| 41 | 41 | $this->assertFileExists($newFilename); |
@@ -76,15 +76,15 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function testException(): void |
| 78 | 78 | { |
| 79 | - try { |
|
| 79 | + try{ |
|
| 80 | 80 | fopen('spiral://non-exists', 'rb'); |
| 81 | - } catch (\Throwable $e) { |
|
| 81 | + }catch (\Throwable $e){ |
|
| 82 | 82 | $this->assertStringContainsString('failed to open stream', $e->getMessage()); |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | - try { |
|
| 85 | + try{ |
|
| 86 | 86 | filemtime('spiral://non-exists'); |
| 87 | - } catch (\Throwable $e) { |
|
| 87 | + }catch (\Throwable $e){ |
|
| 88 | 88 | $this->assertStringContainsString('stat failed', $e->getMessage()); |
| 89 | 89 | } |
| 90 | 90 | } |
@@ -94,15 +94,15 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | public function testExceptionPHP8(): void |
| 96 | 96 | { |
| 97 | - try { |
|
| 97 | + try{ |
|
| 98 | 98 | fopen('spiral://non-exists', 'rb'); |
| 99 | - } catch (\Throwable $e) { |
|
| 99 | + }catch (\Throwable $e){ |
|
| 100 | 100 | $this->assertStringContainsString('Failed to open stream', $e->getMessage()); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | - try { |
|
| 103 | + try{ |
|
| 104 | 104 | filemtime('spiral://non-exists'); |
| 105 | - } catch (\Throwable $e) { |
|
| 105 | + }catch (\Throwable $e){ |
|
| 106 | 106 | $this->assertStringContainsString('stat failed', $e->getMessage()); |
| 107 | 107 | } |
| 108 | 108 | } |
@@ -76,15 +76,21 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function testException(): void |
| 78 | 78 | { |
| 79 | - try { |
|
| 79 | + try |
|
| 80 | + { |
|
| 80 | 81 | fopen('spiral://non-exists', 'rb'); |
| 81 | - } catch (\Throwable $e) { |
|
| 82 | + } |
|
| 83 | + catch (\Throwable $e) |
|
| 84 | + { |
|
| 82 | 85 | $this->assertStringContainsString('failed to open stream', $e->getMessage()); |
| 83 | 86 | } |
| 84 | 87 | |
| 85 | - try { |
|
| 88 | + try |
|
| 89 | + { |
|
| 86 | 90 | filemtime('spiral://non-exists'); |
| 87 | - } catch (\Throwable $e) { |
|
| 91 | + } |
|
| 92 | + catch (\Throwable $e) |
|
| 93 | + { |
|
| 88 | 94 | $this->assertStringContainsString('stat failed', $e->getMessage()); |
| 89 | 95 | } |
| 90 | 96 | } |
@@ -94,15 +100,21 @@ discard block |
||
| 94 | 100 | */ |
| 95 | 101 | public function testExceptionPHP8(): void |
| 96 | 102 | { |
| 97 | - try { |
|
| 103 | + try |
|
| 104 | + { |
|
| 98 | 105 | fopen('spiral://non-exists', 'rb'); |
| 99 | - } catch (\Throwable $e) { |
|
| 106 | + } |
|
| 107 | + catch (\Throwable $e) |
|
| 108 | + { |
|
| 100 | 109 | $this->assertStringContainsString('Failed to open stream', $e->getMessage()); |
| 101 | 110 | } |
| 102 | 111 | |
| 103 | - try { |
|
| 112 | + try |
|
| 113 | + { |
|
| 104 | 114 | filemtime('spiral://non-exists'); |
| 105 | - } catch (\Throwable $e) { |
|
| 115 | + } |
|
| 116 | + catch (\Throwable $e) |
|
| 117 | + { |
|
| 106 | 118 | $this->assertStringContainsString('stat failed', $e->getMessage()); |
| 107 | 119 | } |
| 108 | 120 | } |