Skip to content

Commit c9d1783

Browse files
committed
tests: add test for setSecurityCSRF()
1 parent d198764 commit c9d1783

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/Commands/SetupTest.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public function testRun(): void
6060
$routes = file_get_contents($appFolder . 'Config/Routes.php');
6161
$this->assertStringContainsString('service(\'auth\')->routes($routes);', $routes);
6262

63+
$security = file_get_contents($appFolder . 'Config/Security.php');
64+
$this->assertStringContainsString('public $csrfProtection = \'session\';', $security);
65+
6366
$result = str_replace(["\033[0;32m", "\033[0m"], '', CITestStreamFilter::$buffer);
6467

6568
$this->assertStringContainsString(
@@ -73,5 +76,10 @@ public function testRun(): void
7376
'Running all new migrations...',
7477
$result
7578
);
79+
80+
$this->assertStringContainsString(
81+
'Update: We have updated file \'vfs://root/Config/Security.php\' for security reasons.',
82+
$result
83+
);
7684
}
7785
}

0 commit comments

Comments
 (0)