mirror of
https://github.com/yiisoft/app.git
synced 2026-03-03 14:54:02 +01:00
33 lines
690 B
PHP
33 lines
690 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Tests\Functional;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use Yiisoft\Yii\Testing\FunctionalTester;
|
|
|
|
final class SiteControllerTest extends TestCase
|
|
{
|
|
private ?FunctionalTester $tester;
|
|
|
|
protected function setUp(): void
|
|
{
|
|
$this->tester = new FunctionalTester();
|
|
}
|
|
|
|
public function testGetIndex()
|
|
{
|
|
$method = 'GET';
|
|
$url = '/';
|
|
|
|
$this->tester->bootstrapApplication(dirname(__DIR__, 2));
|
|
$response = $this->tester->doRequest($method, $url);
|
|
|
|
$this->assertStringContainsString(
|
|
'Don\'t forget to check the guide',
|
|
$response->getContent()
|
|
);
|
|
}
|
|
}
|