Пример #1
0
 public function testNoTags()
 {
     $expect = array('1', 'true', 't', '1', '42', '10', 'yes', '1,1', '', 'false', 'f', '0', 'This text is false', '', '', '', 'string', '', 'no', 'alert();', '*****@*****.**', '*****@*****.**', 'http://testing.co', 'http://testing.co', '01/01/1970', '31/12/1970', '12/31/1970', '10/10/70', '127.0.0.1', '255.255.255.255', '2001:0db8:0000:0000:0000:ff00:0042:8329');
     foreach ($this->tests as $index => $value) {
         $this->assertSame($expect[$index], Filter::noTags($value), "Test index: {$index}");
     }
     $this->assertSame($expect, call_user_func_array('\\Filter\\Filter::noTags', $this->tests));
 }