class TestClass extends PHPUnit_Framework_TestCase {
function testSomething() {
$class = new Class();
$this->assertTrue($class->someFunc(1));
}
function testSomethingAgain() {
$class = new Class();
$this->assertFalse($class->someFunc(0));
}
}
嗨,我真的必须为我创建的每个测试函数创建 $class 吗?或者是否有一个未知的构造函数,比如我还没有发现的函数,因为构造函数似乎在 PHPUnit 中不起作用。
谢谢