<?php
class Sample_model_test extends DbTestCase
{
private $obj;
public function setUp()
{
parent::setUp();
$this->obj = $this->newModel('sample_model');
}
public function test_sample_insert()
{
$this->obj->add_sample('john');
$this->grabFromDatabase('sample', ['name' => 'john']);
}
}
following error message.
Error: Call to a member function real_escape_string() on boolean
/vagrant/vendor/codeigniter/framework/system/database/drivers/mysqli/mysqli_driver.php:391
/vagrant/vendor/codeigniter/framework/system/database/DB_driver.php:1143
/vagrant/vendor/codeigniter/framework/system/database/DB_driver.php:1108
/vagrant/vendor/codeigniter/framework/system/database/DB_query_builder.php:683
/vagrant/vendor/codeigniter/framework/system/database/DB_query_builder.php:623
/vagrant/vendor/kenjis/ci-phpunit-test/application/tests/_ci_phpunit_test/CIPHPUnitTestDbTestCase.php:109
This is to close the DB that the CI Instance has when calling resetInstance.
An error occurred when I ran the following code.
following error message.
This is to close the DB that the CI Instance has when calling
resetInstance
.ci-phpunit-test PR: https://github.com/kenjis/ci-phpunit-test/pull/225