Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
efcebe2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi sir kenji my name is donal,
I was integrate your phpunit to mycodeigniter 3.0 and it run very well. but when i load database in my controller. and when i test the controller with syntax phpunit from my terminal i have an error like below.
cbn-dev@cbndev-ThinkPad-E420:/opt/lampp/htdocs/ciunit/application/tests$ phpunitPHP Fatal error: Call to undefined function mysqli_init() in /opt/lampp/htdocs/ciunit/system/database/drivers/mysqli/mysqli_driver.php on line 125
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
PHP 4. PHPUnit_TextUI_Command->handleArguments() /usr/share/php/PHPUnit/TextUI/Command.php:138
PHP 5. PHPUnit_Util_Configuration->getTestSuiteConfiguration() /usr/share/php/PHPUnit/TextUI/Command.php:657
PHP 6. PHPUnit_Util_Configuration->getTestSuite() /usr/share/php/PHPUnit/Util/Configuration.php:789
PHP 7. PHPUnit_Framework_TestSuite->addTestFiles() /usr/share/php/PHPUnit/Util/Configuration.php:873
PHP 8. PHPUnit_Framework_TestSuite->addTestFile() /usr/share/php/PHPUnit/Framework/TestSuite.php:416
PHP 9. PHPUnit_Framework_TestSuite->addTestSuite() /usr/share/php/PHPUnit/Framework/TestSuite.php:389
PHP 10. PHPUnit_Framework_TestSuite->__construct() /usr/share/php/PHPUnit/Framework/TestSuite.php:315
PHP 11. PHPUnit_Framework_TestSuite->addTestMethod() /usr/share/php/PHPUnit/Framework/TestSuite.php:212
PHP 12. PHPUnit_Framework_TestSuite::createTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:834
PHP 13. Welcome_test->__construct() /usr/share/php/PHPUnit/Framework/TestSuite.php:473
PHP 14. CI_Loader->model() /opt/lampp/htdocs/ciunit/application/tests/controllers/Welcome_test.php:19
PHP 15. Test->__construct() /opt/lampp/htdocs/ciunit/application/tests/_ci_phpunit_test/replacing/core/Loader.php:325
PHP 16. CI_Loader->database() /opt/lampp/htdocs/ciunit/application/models/Test.php:11
PHP 17. DB() /opt/lampp/htdocs/ciunit/application/tests/_ci_phpunit_test/replacing/core/Loader.php:365
PHP 18. CI_DB_driver->initialize() /opt/lampp/htdocs/ciunit/system/database/DB.php:216
PHP 19. CI_DB_mysqli_driver->db_connect() /opt/lampp/htdocs/ciunit/system/database/DB_driver.php:401
Fatal error: Call to undefined function mysqli_init() in /opt/lampp/htdocs/ciunit/system/database/drivers/mysqli/mysqli_driver.php on line 125
Call Stack:
0.0003 233320 1. {main}() /usr/bin/phpunit:0
0.0062 523312 2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
0.0062 523936 3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129
0.0062 526344 4. PHPUnit_TextUI_Command->handleArguments() /usr/share/php/PHPUnit/TextUI/Command.php:138
0.0507 3226248 5. PHPUnit_Util_Configuration->getTestSuiteConfiguration() /usr/share/php/PHPUnit/TextUI/Command.php:657
0.0508 3227480 6. PHPUnit_Util_Configuration->getTestSuite() /usr/share/php/PHPUnit/Util/Configuration.php:789
0.0821 3419240 7. PHPUnit_Framework_TestSuite->addTestFiles() /usr/share/php/PHPUnit/Util/Configuration.php:873
0.0822 3420136 8. PHPUnit_Framework_TestSuite->addTestFile() /usr/share/php/PHPUnit/Framework/TestSuite.php:416
0.0841 3619168 9. PHPUnit_Framework_TestSuite->addTestSuite() /usr/share/php/PHPUnit/Framework/TestSuite.php:389
0.0841 3619384 10. PHPUnit_Framework_TestSuite->__construct() /usr/share/php/PHPUnit/Framework/TestSuite.php:315
0.0844 3721064 11. PHPUnit_Framework_TestSuite->addTestMethod() /usr/share/php/PHPUnit/Framework/TestSuite.php:212
0.0844 3721976 12. PHPUnit_Framework_TestSuite::createTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:834
0.0857 3818280 13. Welcome_test->__construct() /usr/share/php/PHPUnit/Framework/TestSuite.php:473
0.0857 3818696 14. CI_Loader->model() /opt/lampp/htdocs/ciunit/application/tests/controllers/Welcome_test.php:19
0.0862 3827264 15. Test->__construct() /opt/lampp/htdocs/ciunit/application/tests/_ci_phpunit_test/replacing/core/Loader.php:325
0.0862 3827800 16. CI_Loader->database() /opt/lampp/htdocs/ciunit/application/models/Test.php:11
0.0866 3859616 17. DB() /opt/lampp/htdocs/ciunit/application/tests/_ci_phpunit_test/replacing/core/Loader.php:365
0.0937 4704456 18. CI_DB_driver->initialize() /opt/lampp/htdocs/ciunit/system/database/DB.php:216
0.0937 4705160 19. CI_DB_mysqli_driver->db_connect() /opt/lampp/htdocs/ciunit/system/database/DB_driver.php:401
A PHP Error was encountered
Severity: Error
Message: Call to undefined function mysqli_init()
Filename: /opt/lampp/htdocs/ciunit/system/database/drivers/mysqli/mysqli_driver.php
Line Number: 125
Backtrace:
please help me?
where i get wrong to integrate the phpunit?
efcebe2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please go to: kenjis/ci-phpunit-test#55