Beispiel #1
0
 public function testStripSlashesIfMagicQuotes()
 {
     $_GET['foo1'] = "bar\\'d";
     $getData = Slim_Http_Request::stripSlashesIfMagicQuotes($_GET);
     $this->assertEquals($getData['foo1'], "bar'd");
 }
 public function testStripSlashesIfMagicQuotes()
 {
     $_GET['foo1'] = "bar\\'d";
     $getData = Slim_Http_Request::stripSlashesIfMagicQuotes($_GET);
     if (get_magic_quotes_gpc()) {
         $this->assertEquals("bar'd", $getData['foo1']);
     } else {
         $this->assertEquals("bar\\'d", $getData['foo1']);
     }
 }