作者:Boss-201411 | 来源:互联网 | 2023-05-17 03:20
PHPUnitrunsthesetUp()methodofatestclasspriortorunningaspecifictest.PHPUnit在运行特定测试之前运行
PHPUnit runs the setUp()
method of a test class prior to running a specific test.
PHPUnit在运行特定测试之前运行测试类的setUp()方法。
I load up test-specific fixtures for every test in a test class and would prefer not to have to explicitly do so. I would ideally like to handle this automagically in the setUp()
method.
我为测试类中的每个测试加载特定于测试的灯具,并且不希望明确地这样做。理想情况下,我想在setUp()方法中自动处理这个问题。
If the setUp()
method makes available the test class name and test method name this can be done.
如果setUp()方法提供测试类名称和测试方法名称,则可以执行此操作。
Is the name of the test class and method that is about to be run available to me in the setUp()
method?
是否在setUp()方法中可以运行的测试类和方法的名称?
2 个解决方案