5
मैं ऐसे किसी भी बात नहीं पा सके, और मैं यह मौजूद नहीं है अनुमान लगा रहा हूँ ..क्या सेट अप स्थिरता में वर्तमान परीक्षण प्राप्त करना संभव है?
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' को निजी में बदल दिया गया था, इसलिए आपको' $ this-> getName() 'का उपयोग करने की आवश्यकता होगी। –
उसने ऐसा किया, धन्यवाद! – velo9
दरअसल, स्रोत उपलब्ध होने का सबसे अच्छा तरीका स्रोत है। :) –