示例#1
0
 public function testThrow1()
 {
     if (!method_exists('PHPUnit_Runner_Version', 'id') || version_compare(\PHPUnit_Runner_Version::id(), '5.2.0', '<')) {
         $this->setExpectedException('\\Exception', 'error');
     } else {
         $this->expectException('\\Exception', 'error');
     }
     $t = new \Test\TryTest();
     $t->testThrow1();
 }
示例#2
0
 public function testThrow1()
 {
     $this->setExpectedException('\\Exception', 'error');
     $t = new \Test\TryTest();
     $t->testThrow1();
 }