Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Bauer committed Jul 22, 2024
1 parent 490033e commit 16791d7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ class SecurityComponentTest extends CakeTestCase {
*/
public function setUp() : void {
parent::setUp();
$_SERVER['REQUEST_METHOD'] = 'GET';

$request = $this->getMock('CakeRequest', array('here'), array('posts/index', false));
$request->addParams(array('controller' => 'posts', 'action' => 'index'));
Expand Down Expand Up @@ -321,7 +322,7 @@ public function testRequireSecureFail() {
* @return void
*/
public function testRequireSecureSucceed() {
$_SERVER['REQUEST_METHOD'] = 'Secure';
$_SERVER['REQUEST_METHOD'] = 'GET';
$this->Controller->request['action'] = 'posted';
$_SERVER['HTTPS'] = 'on';
$this->Controller->Security->requireSecure('posted');
Expand Down

0 comments on commit 16791d7

Please sign in to comment.