Skip to content

Commit

Permalink
Merge pull request #8 from Xammie/integration-test
Browse files Browse the repository at this point in the history
Add example test case
  • Loading branch information
brendt authored Dec 7, 2024
2 parents 486ce26 + ef7af32 commit 83519c5
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ vendor/
/package-lock.json
/.php-cs-fixer.cache
.env
.idea
.idea
.phpunit.result.cache
Empty file removed tests/.gitkeep
Empty file.
16 changes: 16 additions & 0 deletions tests/HomeControllerTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace Tests;

class HomeControllerTest extends IntegrationTestCase
{
public function test_index(): void
{
$this->http
->get('/')
->assertOk()
->assertSee('Tempest');
}
}
12 changes: 12 additions & 0 deletions tests/IntegrationTestCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

declare(strict_types=1);

namespace Tests;

use Tempest\Framework\Testing\IntegrationTest;

abstract class IntegrationTestCase extends IntegrationTest
{
protected string $root = __DIR__ . '/../';
}

0 comments on commit 83519c5

Please sign in to comment.