コード例 #1
0
 public function testCanGrabPostBeforeGet()
 {
     $_POST['TEST'] = 5;
     $_GET['TEST'] = 3;
     $this->assertEquals(5, $this->request->getPostGet('TEST'));
     $this->assertEquals(3, $this->request->getGetPost('TEST'));
 }
コード例 #2
0
 public function testFetchGlobalFiltersSelectedValues()
 {
     $_POST = ['foo' => 'bar<script>', 'bar' => 'baz<script>', 'xxx' => 'yyy<script>', 'yyy' => 'zzz<script>'];
     $expected = ['foo' => 'bar%3Cscript%3E', 'bar' => 'baz%3Cscript%3E'];
     $this->assertEquals($expected, $this->request->getPost(['foo', 'bar'], FILTER_SANITIZE_ENCODED));
 }