2013-05-27 38 views
0

我在系統上運行phpunit 3.2.8(沒有可能更新此代碼的版本),並且想跳過某些php單元測試。我怎樣才能做到這一點?如何跳過php的unittests?

在python中,您只需在測試函數之前添加一個裝飾器就可以跳過它。我如何使用指定版本的phpunit來執行此操作?

回答

2

你可能標誌着它跳過像這樣:

class SomeTestCase extends PHPUnit_Framework_TestCase 
{ 
    public function testSomething() 
    { 
     $this->markTestSkipped(); 
     // rest of test here ... 
    } 
}