Skip to content

Commit

Permalink
fix: fix test assign null (kernel) (#393)
Browse files Browse the repository at this point in the history
* fix: fix test assign null (kernel)

* fix back slash meter
  • Loading branch information
SonyPradana authored Sep 25, 2024
1 parent 9f01de5 commit 8f2f73e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/System/Integrate/Testing/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

class TestCase extends BaseTestCase
{
protected Application $app;
protected Karnel $karnel;
protected ?Application $app = null;
protected ?Karnel $karnel = null;
protected string $class;

protected function setUp(): void
Expand Down
26 changes: 26 additions & 0 deletions tests/Integrate/Testing/TestCaseTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

declare(strict_types=1);

namespace System\Test\Integrate\Testing;

use System\Integrate\Application;
use System\Integrate\Http\Karnel;
use System\Integrate\Testing\TestCase;

final class TestCaseTest extends TestCase
{
protected function setUp(): void
{
require_once dirname(__DIR__) . DIRECTORY_SEPARATOR . 'Bootstrap' . DIRECTORY_SEPARATOR . 'RegisterProvidersTest.php';
$this->app = new Application(dirname(__DIR__) . '/assets/app2');
$this->app->set(Karnel::class, fn () => new Karnel($this->app));

parent::setUp();
}

public function testTestRunSmoothly(): void
{
$this->assertTrue(true);
}
}

0 comments on commit 8f2f73e

Please sign in to comment.