Skip to content

Commit ce07782

Browse files
authored
Merge pull request #951 from hydephp/create-custom-console-kernel-implementation
Create custom console kernel implementation
2 parents b84819c + 5aa822c commit ce07782

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

app/bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
$app->singleton(
3030
Illuminate\Contracts\Console\Kernel::class,
31-
LaravelZero\Framework\Kernel::class
31+
\Hyde\Foundation\ConsoleKernel::class
3232
);
3333

3434
$app->singleton(
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Hyde\Foundation;
6+
7+
use LaravelZero\Framework\Kernel;
8+
9+
class ConsoleKernel extends Kernel
10+
{
11+
//
12+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Hyde\Framework\Testing\Unit;
6+
7+
use Illuminate\Contracts\Console\Kernel;
8+
use Hyde\Foundation\ConsoleKernel;
9+
use Hyde\Testing\TestCase;
10+
11+
/**
12+
* @covers \Hyde\Foundation\ConsoleKernel
13+
*/
14+
class ConsoleKernelTest extends TestCase
15+
{
16+
public function testIsInstantiable()
17+
{
18+
$this->assertInstanceOf(ConsoleKernel::class, app(ConsoleKernel::class));
19+
}
20+
21+
public function testClassImplementsKernelInterface()
22+
{
23+
$this->assertInstanceOf(Kernel::class, app(ConsoleKernel::class));
24+
}
25+
}

0 commit comments

Comments
 (0)