Passed
Push — master ( b7dddf...303190 )
by Caen
03:32 queued 13s
created
packages/realtime-compiler/tests/RealtimeCompilerTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@  discard block
 block discarded – undo
12 12
 
13 13
 define('BASE_PATH', realpath(__DIR__.'/../../../'));
14 14
 
15
-if (BASE_PATH === false || ! file_exists(BASE_PATH.'/hyde')) {
15
+if (BASE_PATH === false || !file_exists(BASE_PATH.'/hyde')) {
16 16
     throw new InvalidArgumentException('This test suite must be run from the root of the hydephp/develop monorepo.');
17 17
 }
18 18
 
19 19
 ob_start();
20 20
 
21
-test('handle routes index page', function () {
21
+test('handle routes index page', function() {
22 22
     putenv('SERVER_DASHBOARD=false');
23 23
     mockRoute('');
24 24
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     Filesystem::unlink('_site/index.html');
38 38
 });
39 39
 
40
-test('handle routes custom pages', function () {
40
+test('handle routes custom pages', function() {
41 41
     mockRoute('foo');
42 42
 
43 43
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     Filesystem::unlink('_site/foo.html');
56 56
 });
57 57
 
58
-test('handle routes pages with .html extension', function () {
58
+test('handle routes pages with .html extension', function() {
59 59
     mockRoute('foo.html');
60 60
 
61 61
     Filesystem::put('_pages/foo.md', '# Hello World!');
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     Filesystem::unlink('_site/foo.html');
74 74
 });
75 75
 
76
-test('handle routes static assets', function () {
76
+test('handle routes static assets', function() {
77 77
     mockRoute('media/app.css');
78 78
 
79 79
     $kernel = new HttpKernel();
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
     expect($response->body)->toContain('/*! HydeFront v2.0.0');
87 87
 });
88 88
 
89
-test('handle throws route not found exception for missing route', function () {
89
+test('handle throws route not found exception for missing route', function() {
90 90
     mockRoute('missing');
91 91
 
92 92
     $kernel = new HttpKernel();
93 93
     $kernel->handle(new Request());
94 94
 })->throws(RouteNotFoundException::class, "Route not found: 'missing'");
95 95
 
96
-test('handle sends 404 error response for missing asset', function () {
96
+test('handle sends 404 error response for missing asset', function() {
97 97
     mockRoute('missing.css');
98 98
 
99 99
     $kernel = new HttpKernel();
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
         ->and($response->statusMessage)->toBe('Not Found');
105 105
 });
106 106
 
107
-test('docs uri path is rerouted to docs/index', function () {
107
+test('docs uri path is rerouted to docs/index', function() {
108 108
     mockRoute('docs');
109 109
 
110 110
     Filesystem::put('_docs/index.md', '# Hello World!');
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     Filesystem::unlink('_site/docs/index.html');
123 123
 });
124 124
 
125
-test('docs/search renders search page', function () {
125
+test('docs/search renders search page', function() {
126 126
     mockRoute('docs/search');
127 127
 
128 128
     Blade::shouldReceive('render')->once()->andReturn('foo');
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     expect($response->body)->toBe('foo');
138 138
 });
139 139
 
140
-test('ping route returns ping response', function () {
140
+test('ping route returns ping response', function() {
141 141
     mockRoute('ping');
142 142
 
143 143
     $kernel = new HttpKernel();
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
         ->and($response->statusMessage)->toBe('OK');
149 149
 });
150 150
 
151
-test('exception handling', function () {
151
+test('exception handling', function() {
152 152
     $exception = new Exception('foo');
153 153
     $response = ExceptionHandler::handle($exception);
154 154
 
Please login to merge, or discard this patch.