Skip to content

Commit

Permalink
Add feature test
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesChou committed Jul 7, 2023
1 parent 5481c8c commit 215eba4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/Feature/Http/Controllers/User/CatalogPageTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Tests\Feature\Http\Controllers\User;

use Illuminate\Foundation\Testing\RefreshDatabase;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;

class CatalogPageTest extends TestCase
{
use RefreshDatabase;

#[Test]
public function seeBasicItem()
{
$this->get('/catalog')
->assertSee('Categories')
->assertSee('Price');
}
}
20 changes: 20 additions & 0 deletions tests/Feature/Http/Controllers/User/ShopTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php

namespace Tests\Feature\Http\Controllers\User;

use Illuminate\Foundation\Testing\RefreshDatabase;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;

class ShopTest extends TestCase
{
use RefreshDatabase;

#[Test]
public function seeBasicTitle()
{
$this->get('/')
->assertSee('Categories')
->assertSee('Just For You');
}
}

0 comments on commit 215eba4

Please sign in to comment.