首页 > 代码库 > php单元测试工具

php单元测试工具

//composer.json
"require-dev":{
     "phpunit/phpunit": "^5.4"         
}

  

class MyPHPClassTest extends \PHPUnit_Framework_TestCase{//class must end with Test and extend class PHPUnit_Framework_TestCase
    public function testMethod()//method must start with test
    {
        $this->assertTrue(True);
    }   
}

  

php单元测试工具