mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Fix unit tests to ignore user warnings during CSRF test
This commit is contained in:
parent
fea55d17b4
commit
d62756dcd5
1 changed files with 4 additions and 0 deletions
|
|
@ -106,6 +106,8 @@ class SecurityTest extends \Codeception\TestCase\Test
|
|||
|
||||
public function testCheckCSRF()
|
||||
{
|
||||
$error_reporting = error_reporting(0);
|
||||
|
||||
$_SERVER['REQUEST_METHOD'] = 'GET';
|
||||
$_SERVER['HTTP_REFERER'] = '';
|
||||
$this->assertTrue(Rhymix\Framework\Security::checkCSRF());
|
||||
|
|
@ -117,6 +119,8 @@ class SecurityTest extends \Codeception\TestCase\Test
|
|||
$this->assertFalse(Rhymix\Framework\Security::checkCSRF());
|
||||
|
||||
$this->assertTrue(Rhymix\Framework\Security::checkCSRF('http://www.rhymix.org/'));
|
||||
|
||||
error_reporting($error_reporting);
|
||||
}
|
||||
|
||||
public function testCheckXEE()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue