5
non ho potuto trovare alcunché di simile, e sto cercando di indovinare che non esiste ..È possibile ottenere il test corrente nel dispositivo setUp?
class Test extends PHPUnit_Framework_TestCase {
public function setUp() {
echo $current_test; // Output a string "testOne"
}
public function testOne() {
// This is the first test; before this test is ran setUp() is called.
// The question is, is there any way to know within setUp() what the
// current test is?
}
}
'$ name' è stato modificato in privato, quindi è necessario utilizzare' $ this-> getName() '. –
Questo l'ha fatto, grazie! – velo9
In effetti, la fonte è il modo migliore per trovare ciò che è disponibile. :) –