Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Jan 8, 2024
1 parent d5949a4 commit b19075a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion tests/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
namespace Orchestra\Testbench\BrowserKit\Tests;

use Orchestra\Testbench\BrowserKit\TestCase;
use PHPUnit\Framework\Attributes\Test;

class ApplicationTest extends TestCase
{
/** @test */
#[Test]
public function itUsesTestingAsEnvironment()
{
$this->assertEquals('testing', $this->app->environment());
Expand Down
15 changes: 8 additions & 7 deletions tests/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Routing\Router;
use Orchestra\Testbench\BrowserKit\TestCase;
use PHPUnit\Framework\Attributes\Test;

class RouteTest extends TestCase
{
Expand Down Expand Up @@ -36,7 +37,7 @@ protected function defineRoutes($router)
$router->resource('foo', 'Orchestra\Testbench\BrowserKit\Tests\Stubs\Controller');
}

/** @test */
#[Test]
public function canSendRequest()
{
$crawler = $this->call('GET', 'hello');
Expand All @@ -48,7 +49,7 @@ public function canSendRequest()
$this->assertEquals('goodbye world', $crawler->getContent());
}

/** @test */
#[Test]
public function canSendRequestViaNamedRoute()
{
$crawler = $this->route('GET', 'hi');
Expand All @@ -60,7 +61,7 @@ public function canSendRequestViaNamedRoute()
$this->assertEquals('goodbye world', $crawler->getContent());
}

/** @test */
#[Test]
public function canSendRequestWithPrefix()
{
$crawler = $this->call('GET', 'boss/hello');
Expand All @@ -72,7 +73,7 @@ public function canSendRequestWithPrefix()
$this->assertEquals('goodbye boss', $crawler->getContent());
}

/** @test */
#[Test]
public function canSendRequestWithPrefixViaNamedRoute()
{
$crawler = $this->route('GET', 'boss.hi');
Expand All @@ -84,7 +85,7 @@ public function canSendRequestWithPrefixViaNamedRoute()
$this->assertEquals('goodbye boss', $crawler->getContent());
}

/** @test */
#[Test]
public function canSendRequestUsingActionHelper()
{
$crawler = $this->action('GET', 'Orchestra\Testbench\BrowserKit\Tests\Stubs\Controller@index');
Expand All @@ -93,7 +94,7 @@ public function canSendRequestUsingActionHelper()
$this->assertEquals('Controller@index', $crawler->getContent());
}

/** @test */
#[Test]
public function canSendRequestUsingCallHelper()
{
$crawler = $this->call('GET', 'foo');
Expand All @@ -102,7 +103,7 @@ public function canSendRequestUsingCallHelper()
$this->assertEquals('Controller@index', $crawler->getContent());
}

/** @test */
#[Test]
public function canSendRequestUsingPostAndReturnJson()
{
$crawler = $this->post('foo', [
Expand Down

0 comments on commit b19075a

Please sign in to comment.