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