{"action":"closed","issue":{"url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/55","labels_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/55/comments","events_url":"https://api.github.com/repos/kenjis/ci-phpunit-test/issues/55/events","html_url":"https://github.com/kenjis/ci-phpunit-test/issues/55","id":105756228,"number":55,"title":"Fatal error:  Call to undefined function mysqli_init() in .../system/database/drivers/mysqli/mysqli_driver.php on line 125","user":{"login":"kenjis","id":87955,"avatar_url":"https://avatars.githubusercontent.com/u/87955?v=3","gravatar_id":"","url":"https://api.github.com/users/kenjis","html_url":"https://github.com/kenjis","followers_url":"https://api.github.com/users/kenjis/followers","following_url":"https://api.github.com/users/kenjis/following{/other_user}","gists_url":"https://api.github.com/users/kenjis/gists{/gist_id}","starred_url":"https://api.github.com/users/kenjis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kenjis/subscriptions","organizations_url":"https://api.github.com/users/kenjis/orgs","repos_url":"https://api.github.com/users/kenjis/repos","events_url":"https://api.github.com/users/kenjis/events{/privacy}","received_events_url":"https://api.github.com/users/kenjis/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kenjis/ci-phpunit-test/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-10T08:13:46Z","updated_at":"2015-09-10T22:22:02Z","closed_at":"2015-09-10T22:22:02Z","body":"from: https://github.com/kenjis/ci-app-for-ci-phpunit-test/commit/efcebe2cb0e90f80afb4bd2616aa251107c66c7a#commitcomment-13151224\r\n\r\nhi sir kenji my name is donal, \r\nI 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.\r\n\r\n~~~\r\ncbn-dev@cbndev-ThinkPad-E420:/opt/lampp/htdocs/ciunit/application/tests$ phpunit\r\nPHP Fatal error:  Call to undefined function mysqli_init() in /opt/lampp/htdocs/ciunit/system/database/drivers/mysqli/mysqli_driver.php on line 125\r\nPHP Stack trace:\r\nPHP   1. {main}() /usr/bin/phpunit:0\r\nPHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46\r\nPHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129\r\nPHP   4. PHPUnit_TextUI_Command->handleArguments() /usr/share/php/PHPUnit/TextUI/Command.php:138\r\nPHP   5. PHPUnit_Util_Configuration->getTestSuiteConfiguration() /usr/share/php/PHPUnit/TextUI/Command.php:657\r\nPHP   6. PHPUnit_Util_Configuration->getTestSuite() /usr/share/php/PHPUnit/Util/Configuration.php:789\r\nPHP   7. PHPUnit_Framework_TestSuite->addTestFiles() /usr/share/php/PHPUnit/Util/Configuration.php:873\r\nPHP   8. PHPUnit_Framework_TestSuite->addTestFile() /usr/share/php/PHPUnit/Framework/TestSuite.php:416\r\nPHP   9. PHPUnit_Framework_TestSuite->addTestSuite() /usr/share/php/PHPUnit/Framework/TestSuite.php:389\r\nPHP  10. PHPUnit_Framework_TestSuite->__construct() /usr/share/php/PHPUnit/Framework/TestSuite.php:315\r\nPHP  11. PHPUnit_Framework_TestSuite->addTestMethod() /usr/share/php/PHPUnit/Framework/TestSuite.php:212\r\nPHP  12. PHPUnit_Framework_TestSuite::createTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:834\r\nPHP  13. Welcome_test->__construct() /usr/share/php/PHPUnit/Framework/TestSuite.php:473\r\nPHP  14. CI_Loader->model() /opt/lampp/htdocs/ciunit/application/tests/controllers/Welcome_test.php:19\r\nPHP  15. Test->__construct() /opt/lampp/htdocs/ciunit/application/tests/_ci_phpunit_test/replacing/core/Loader.php:325\r\nPHP  16. CI_Loader->database() /opt/lampp/htdocs/ciunit/application/models/Test.php:11\r\nPHP  17. DB() /opt/lampp/htdocs/ciunit/application/tests/_ci_phpunit_test/replacing/core/Loader.php:365\r\nPHP  18. CI_DB_driver->initialize() /opt/lampp/htdocs/ciunit/system/database/DB.php:216\r\nPHP  19. CI_DB_mysqli_driver->db_connect() /opt/lampp/htdocs/ciunit/system/database/DB_driver.php:401\r\n\r\nFatal error: Call to undefined function mysqli_init() in /opt/lampp/htdocs/ciunit/system/database/drivers/mysqli/mysqli_driver.php on line 125\r\n\r\nCall Stack:\r\n    0.0003     233320   1. {main}() /usr/bin/phpunit:0\r\n    0.0062     523312   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46\r\n    0.0062     523936   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:129\r\n    0.0062     526344   4. PHPUnit_TextUI_Command->handleArguments() /usr/share/php/PHPUnit/TextUI/Command.php:138\r\n    0.0507    3226248   5. PHPUnit_Util_Configuration->getTestSuiteConfiguration() /usr/share/php/PHPUnit/TextUI/Command.php:657\r\n    0.0508    3227480   6. PHPUnit_Util_Configuration->getTestSuite() /usr/share/php/PHPUnit/Util/Configuration.php:789\r\n    0.0821    3419240   7. PHPUnit_Framework_TestSuite->addTestFiles() /usr/share/php/PHPUnit/Util/Configuration.php:873\r\n    0.0822    3420136   8. PHPUnit_Framework_TestSuite->addTestFile() /usr/share/php/PHPUnit/Framework/TestSuite.php:416\r\n    0.0841    3619168   9. PHPUnit_Framework_TestSuite->addTestSuite() /usr/share/php/PHPUnit/Framework/TestSuite.php:389\r\n    0.0841    3619384  10. PHPUnit_Framework_TestSuite->__construct() /usr/share/php/PHPUnit/Framework/TestSuite.php:315\r\n    0.0844    3721064  11. PHPUnit_Framework_TestSuite->addTestMethod() /usr/share/php/PHPUnit/Framework/TestSuite.php:212\r\n    0.0844    3721976  12. PHPUnit_Framework_TestSuite::createTest() /usr/share/php/PHPUnit/Framework/TestSuite.php:834\r\n    0.0857    3818280  13. Welcome_test->__construct() /usr/share/php/PHPUnit/Framework/TestSuite.php:473\r\n    0.0857    3818696  14. CI_Loader->model() /opt/lampp/htdocs/ciunit/application/tests/controllers/Welcome_test.php:19\r\n    0.0862    3827264  15. Test->__construct() /opt/lampp/htdocs/ciunit/application/tests/_ci_phpunit_test/replacing/core/Loader.php:325\r\n    0.0862    3827800  16. CI_Loader->database() /opt/lampp/htdocs/ciunit/application/models/Test.php:11\r\n    0.0866    3859616  17. DB() /opt/lampp/htdocs/ciunit/application/tests/_ci_phpunit_test/replacing/core/Loader.php:365\r\n    0.0937    4704456  18. CI_DB_driver->initialize() /opt/lampp/htdocs/ciunit/system/database/DB.php:216\r\n    0.0937    4705160  19. CI_DB_mysqli_driver->db_connect() /opt/lampp/htdocs/ciunit/system/database/DB_driver.php:401\r\n\r\n\r\nA PHP Error was encountered\r\n\r\nSeverity:    Error\r\nMessage:     Call to undefined function mysqli_init()\r\nFilename:    /opt/lampp/htdocs/ciunit/system/database/drivers/mysqli/mysqli_driver.php\r\nLine Number: 125\r\n\r\nBacktrace:\r\n~~~\r\n\r\n please help me?\r\nwhere i get wrong to integrate the phpunit?"}}