Skip to content

Commit

Permalink
Merge pull request #8493 from kenjis/docs-testing/controllers
Browse files Browse the repository at this point in the history
docs: fix sample code in testing/controllers
  • Loading branch information
kenjis authored Feb 2, 2024
2 parents 3ca481c + 1cd91a9 commit a0bbb02
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions user_guide_src/source/testing/controllers/001.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace CodeIgniter;
namespace App\Controllers;

use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\ControllerTestTrait;
use CodeIgniter\Test\DatabaseTestTrait;

class TestControllerA extends CIUnitTestCase
class FooControllerTest extends CIUnitTestCase
{
use ControllerTestTrait;
use DatabaseTestTrait;
Expand Down
6 changes: 3 additions & 3 deletions user_guide_src/source/testing/controllers/002.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<?php

namespace CodeIgniter;
namespace App\Controllers;

use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\ControllerTestTrait;
use CodeIgniter\Test\DatabaseTestTrait;

class TestControllerA extends CIUnitTestCase
class ForumControllerTest extends CIUnitTestCase
{
use ControllerTestTrait;
use DatabaseTestTrait;

public function testShowCategories()
{
$result = $this->withURI('http://example.com/categories')
->controller(\App\Controllers\ForumController::class)
->controller(ForumController::class)
->execute('showCategories');

$this->assertTrue($result->isOK());
Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/testing/controllers/011.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace CodeIgniter;
namespace App\Filters;

use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\FilterTestTrait;

class FilterTestCase extends CIUnitTestCase
class FooFilterTest extends CIUnitTestCase
{
use FilterTestTrait;
}
4 changes: 2 additions & 2 deletions user_guide_src/source/testing/controllers/012.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace CodeIgniter;
namespace App\Filters;

use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\FilterTestTrait;

final class FilterTestCase extends CIUnitTestCase
final class FooFilterTest extends CIUnitTestCase
{
use FilterTestTrait;

Expand Down
4 changes: 2 additions & 2 deletions user_guide_src/source/testing/controllers/014.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?php

namespace CodeIgniter;
namespace App\Filters;

use CodeIgniter\Test\CIUnitTestCase;
use CodeIgniter\Test\FilterTestTrait;

final class FilterTestCase extends CIUnitTestCase
final class FooFilterTest extends CIUnitTestCase
{
use FilterTestTrait;

Expand Down

0 comments on commit a0bbb02

Please sign in to comment.