जब मैं अपने प्रोजेक्ट के परीक्षण फ़ोल्डर के भीतर से phpunit .
चलाने का प्रयास मैं निम्नलिखित त्रुटि मिलती है:समय त्रुटि चल PHPUnit
PHP Fatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/share/php/PHPUnit/Framework.php on line 46
मैं इन कमांड के माध्यम से PHPUnit स्थापित:
sudo pear channel-discover pear.symfony-project.com
sudo pear channel-discover components.ez.no
sudo pear install --alldeps phpunit/PHPUnit
में से कोई भी रूप में apt-get
सहित अन्य विधियां काम करने लगती हैं।
I सोचें कोडकॉवरेज ने कुछ समय पर अपने सिंगलटन पैटर्न को बदल दिया और इसलिए getInstance
हटा दिया लेकिन मुझे नहीं पता कि इस त्रुटि को कैसे ठीक किया जाए। मैं या तो CodeCoverage डाउनग्रेड या PHPUnit अपग्रेड कैसे कर सकता हूं?
मैं मैन्युअल रूप से निम्न कमांड के माध्यम से सब कुछ के नवीनतम संस्करण को स्थापित करने की कोशिश की:
sudo apt-get install git
mkdir phpunit && cd phpunit
git clone git://github.com/sebastianbergmann/phpunit.git
git clone git://github.com/sebastianbergmann/dbunit.git
git clone git://github.com/sebastianbergmann/php-file-iterator.git
git clone git://github.com/sebastianbergmann/php-text-template.git
git clone git://github.com/sebastianbergmann/php-code-coverage.git
git clone git://github.com/sebastianbergmann/php-token-stream.git
git clone git://github.com/sebastianbergmann/php-timer.git
git clone git://github.com/sebastianbergmann/phpunit-mock-objects.git
git clone git://github.com/sebastianbergmann/phpunit-selenium.git
git clone git://github.com/sebastianbergmann/phpunit-story.git
git clone git://github.com/sebastianbergmann/php-invoker.git
sudo cp -r dbunit/PHPUnit /usr/share/php/
sudo cp -r php-code-coverage/PHP /usr/share/php/
sudo cp -r php-file-iterator/File /usr/share/php/
sudo cp -r php-invoker/PHP /usr/share/php/
sudo cp -r php-text-template/Text /usr/share/php/
sudo cp -r php-timer/PHP /usr/share/php/
sudo cp -r php-token-stream/PHP /usr/share/php/
sudo cp -r phpunit/PHPUnit /usr/share/php/
sudo cp -r phpunit-mock-objects/PHPUnit /usr/share/php/
sudo cp -r phpunit-selenium/PHPUnit /usr/share/php/
sudo cp -r phpunit-story/PHPUnit /usr/share/php/
sudo cp -r phpunit/phpunit.php /usr/share/php/
लेकिन वह किसी भी मदद नहीं की। अब मैं सिर्फ हर जगह कबाड़ का एक समूह है: \
संस्करण जानकारी:
PEAR Version: 1.9.4
PHP Version: 5.3.6-13ubuntu3.3
Zend Engine Version: 2.3.0
PHPUnit 3.6.9 by Sebastian Bergmann.
Installed packages, channel pear.phpunit.de:
============================================
Package Version State
File_Iterator 1.3.1 stable
PHPUnit 3.6.9 stable
PHPUnit_MockObject 1.1.1 stable
PHP_CodeCoverage 1.1.1 stable
PHP_Invoker 1.1.0 stable
PHP_Timer 1.0.2 stable
PHP_TokenStream 1.1.2 stable
Text_Template 1.1.1 stable
मैं या तो उबंटू 11.10 पर मेरे लिए काम करने के लिए phpUnit प्राप्त करने में सक्षम नहीं हूं। –
मुझे एक ही समस्या है और मैंने इसे पहले से ही ** 50 अंक बाउंटी ** से पूछा है: http://stackoverflow.com/questions/8949963/phpunit-pear-upgrading-errors – Eray
पियर के प्रतिद्वंद्वी के रूप में रिकॉर्ड पर जाकर, और जिस तरह से PHPUnit को इसके वर्तमान स्थिति में रिलीज़ किया गया है। –