我在一次测试中有两种方法,例如:
TestOne()
TestTwo()
我的测试中也有tearDown
方法。
public function tearDown()
{
// here i want to get the current callable method because tearDown method is called after every method
$status = $this->getStatus();
\Log::info("\n\nEnd of exception ".$status);
if ($status == PHPUnit_Runner_BaseTestRunner::STATUS_ERROR
|| $status == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) {
\Log::info("\n Failed Exception");
// take a screenshot...
}
}