@@ -10,7 +10,7 @@ |
||
| 10 | 10 | /** |
| 11 | 11 | * Basic GET route action |
| 12 | 12 | * |
| 13 | - * @return Response |
|
| 13 | + * @return string |
|
| 14 | 14 | */ |
| 15 | 15 | public function indexAction() |
| 16 | 16 | { |
@@ -2,14 +2,14 @@ |
||
| 2 | 2 | use Fyuze\Kernel\Application\Web; |
| 3 | 3 | |
| 4 | 4 | define('APP_START', microtime(true)); |
| 5 | -define('BASE_PATH', __DIR__ . '/../'); |
|
| 6 | -define('APP_PATH', BASE_PATH . '/app'); |
|
| 5 | +define('BASE_PATH', __DIR__.'/../'); |
|
| 6 | +define('APP_PATH', BASE_PATH.'/app'); |
|
| 7 | 7 | |
| 8 | -require BASE_PATH . '/vendor/autoload.php'; |
|
| 8 | +require BASE_PATH.'/vendor/autoload.php'; |
|
| 9 | 9 | |
| 10 | 10 | $app = new Web(BASE_PATH); |
| 11 | 11 | $response = $app->boot(); |
| 12 | 12 | |
| 13 | -include __DIR__ . '/../app/bootstrap.php'; |
|
| 13 | +include __DIR__.'/../app/bootstrap.php'; |
|
| 14 | 14 | |
| 15 | 15 | $response->send(); |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | // $request = $this->createRequest('/'); |
| 14 | 14 | // $this->assertResponse(200); |
| 15 | 15 | // |
| 16 | - $path = realpath(__DIR__ . '/../../../'); |
|
| 16 | + $path = realpath(__DIR__.'/../../../'); |
|
| 17 | 17 | $app = new Web($path); |
| 18 | 18 | $response = $app->boot(); |
| 19 | 19 | |
@@ -21,12 +21,12 @@ discard block |
||
| 21 | 21 | |
| 22 | 22 | $this->assertInstanceOf('Fyuze\Http\Response', $response); |
| 23 | 23 | $this->assertEquals(200, $response->getStatusCode()); |
| 24 | - $this->assertEquals('<body>Welcome to Fyuze!</body>', (string)$response->getBody()); |
|
| 24 | + $this->assertEquals('<body>Welcome to Fyuze!</body>', (string) $response->getBody()); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | public function testAppLoadsSecondaryRoute() |
| 28 | 28 | { |
| 29 | - $path = realpath(__DIR__ . '/../../../'); |
|
| 29 | + $path = realpath(__DIR__.'/../../../'); |
|
| 30 | 30 | $app = new Web($path); |
| 31 | 31 | $_SERVER['REQUEST_URI'] = '/hello/Matthew'; |
| 32 | 32 | $response = $app->boot(); |
@@ -36,12 +36,12 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | $this->assertInstanceOf('Fyuze\Http\Response', $response); |
| 38 | 38 | $this->assertEquals(200, $response->getStatusCode()); |
| 39 | - $this->assertEquals('<body>Hello, Matthew!</body>', (string)$response->getBody()); |
|
| 39 | + $this->assertEquals('<body>Hello, Matthew!</body>', (string) $response->getBody()); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function testAppResolvesDatabaseService() |
| 43 | 43 | { |
| 44 | - $path = realpath(__DIR__ . '/../../../'); |
|
| 44 | + $path = realpath(__DIR__.'/../../../'); |
|
| 45 | 45 | $app = new Web($path); |
| 46 | 46 | $_SERVER['REQUEST_URI'] = '/database'; |
| 47 | 47 | $response = $app->boot(); |
@@ -49,6 +49,6 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | $this->assertInstanceOf('Fyuze\Http\Response', $response); |
| 51 | 51 | //$this->assertEquals(200, $response->getStatusCode()); |
| 52 | - $this->assertEquals('{"name":"matthew"}', (string)$response->getBody()); |
|
| 52 | + $this->assertEquals('{"name":"matthew"}', (string) $response->getBody()); |
|
| 53 | 53 | } |
| 54 | 54 | } |