示例#1
0
文件: AlphaTest.php 项目: seytar/psx
 public function testFilter()
 {
     $filter = new Alpha();
     $this->assertEquals(true, $filter->apply('foo'));
     $this->assertEquals(false, $filter->apply('foo123'));
     $this->assertEquals(false, $filter->apply('123'));
     $this->assertEquals(false, $filter->apply('12 3'));
     $this->assertEquals(false, $filter->apply(''));
     $this->assertEquals(false, $filter->apply('foo%&/'));
     // test error message
     $this->assertErrorMessage($filter->getErrorMessage());
 }