-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c776bf5
commit c32662e
Showing
8 changed files
with
53 additions
and
55 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
use Gravatalonga\Framework\ValueObject\Path; | ||
use Gravatalonga\KingFoundation\Kernel; | ||
|
||
/** | ||
* Create a new Kernel Application | ||
*/ | ||
$app = new Kernel(new Path(__DIR__ . '/../')); | ||
|
||
return $app; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
<?php | ||
|
||
use Gravatalonga\Framework\ValueObject\Path; | ||
use Gravatalonga\KingFoundation\Kernel; | ||
use Middlewares\Whoops; | ||
|
||
require_once "../vendor/autoload.php"; | ||
|
||
chdir(__DIR__ . '/../'); | ||
|
||
$app = new Kernel(new Path(getcwd())); | ||
|
||
$app->add(new Whoops()); | ||
/** | ||
* @var \Gravatalonga\KingFoundation\Kernel $app | ||
*/ | ||
$app = require_once "bootstrap.php"; | ||
|
||
$app->run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Tests; | ||
|
||
use Gravatalonga\KingFoundation\Kernel; | ||
|
||
trait CreateApplication | ||
{ | ||
public function createApplication() | ||
{ | ||
$this->app = require_once __DIR__ . "/../public/bootstrap.php"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace Tests; | ||
|
||
use Gravatalonga\KingFoundation\Kernel; | ||
use PHPUnit\Framework\TestCase as BaseTestCase; | ||
|
||
abstract class TestCase extends BaseTestCase | ||
{ | ||
use CreateApplication; | ||
|
||
protected Kernel $app; | ||
} |