mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Use a more realistic server environment in unit tests
This commit is contained in:
parent
b088348be2
commit
ca7a7b64ea
9 changed files with 81 additions and 98 deletions
|
|
@ -100,11 +100,9 @@ class SecurityTest extends \Codeception\TestCase\Test
|
|||
$_SERVER['REQUEST_METHOD'] = 'POST';
|
||||
$this->assertTrue(Rhymix\Framework\Security::checkCSRF());
|
||||
|
||||
$_SERVER['HTTP_HOST'] = 'www.rhymix.org';
|
||||
$_SERVER['HTTP_REFERER'] = 'http://www.foobar.com/';
|
||||
$this->assertFalse(Rhymix\Framework\Security::checkCSRF());
|
||||
|
||||
$_SERVER['HTTP_HOST'] = 'www.rhymix.org';
|
||||
$this->assertTrue(Rhymix\Framework\Security::checkCSRF('http://www.rhymix.org/'));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue