function testCanApplyPriorFilter() { $filter = new T_Filter_NoMagicQuotes('mb_trim'); $this->assertSame($filter->transform(' no\\\'Quote '), 'no\'Quote'); }
/** * Parse GET, POST, FILES and COOKIE inputs. * * @return array */ protected function parseInput() { $get = $_GET; $post = $_POST; $cookie = $_COOKIE; if (get_magic_quotes_gpc()) { $f = new T_Filter_NoMagicQuotes(); $get = $f->transform($get); $post = $f->transform($post); $cookie = $f->transform($cookie); } $data = array(); $data['GET'] = new T_Cage_Array($get); $files = isset($_FILES) ? $_FILES : array(); $data['POST'] = new T_Cage_Post($post, $files); $data['SERVER'] = new T_Cage_Array($_SERVER); $data['COOKIE'] = new T_Cage_Cookie($cookie); return $data; }