summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/README.md1
-rw-r--r--tests/codeigniter/core/Loader_test.php5
-rw-r--r--tests/mocks/ci_testcase.php2
-rw-r--r--tests/mocks/core/common.php2
-rw-r--r--tests/mocks/database/db.php2
5 files changed, 9 insertions, 3 deletions
diff --git a/tests/README.md b/tests/README.md
index a5f89a2b1..3e32edc0c 100644
--- a/tests/README.md
+++ b/tests/README.md
@@ -17,6 +17,7 @@ format to facilitate clean api design. [see http://arrenbrecht.ch/testing/]
PHP Unit >= 3.5.6
pear channel-discover pear.phpunit.de
+ pear channel-discover pear.symfony.com
pear install phpunit/PHPUnit
vfsStream
diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php
index dea01a555..ac2656e75 100644
--- a/tests/codeigniter/core/Loader_test.php
+++ b/tests/codeigniter/core/Loader_test.php
@@ -147,6 +147,9 @@ class Loader_test extends CI_TestCase {
public function test_driver()
{
+ // Call the autoloader, to include system/libraries/Driver.php
+ class_exists('CI_Driver_Library', TRUE);
+
// Create driver in VFS
$driver = 'unit_test_driver';
$dir = ucfirst($driver);
@@ -220,7 +223,7 @@ class Loader_test extends CI_TestCase {
// Test name conflict
$obj = 'conflict';
- $this->ci_obj->$obj = new StdClass();
+ $this->ci_obj->$obj = new stdClass();
$this->setExpectedException(
'RuntimeException',
'CI Error: The model name you are loading is the name of a resource that is already being used: '.$obj
diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php
index f16492945..ad4fe5ac3 100644
--- a/tests/mocks/ci_testcase.php
+++ b/tests/mocks/ci_testcase.php
@@ -27,7 +27,7 @@ class CI_TestCase extends PHPUnit_Framework_TestCase {
public function __construct()
{
parent::__construct();
- $this->ci_instance = new StdClass();
+ $this->ci_instance = new stdClass();
}
// --------------------------------------------------------------------
diff --git a/tests/mocks/core/common.php b/tests/mocks/core/common.php
index 24d645ae3..0ccfe1ea4 100644
--- a/tests/mocks/core/common.php
+++ b/tests/mocks/core/common.php
@@ -178,7 +178,7 @@ if ( ! function_exists('is_loaded'))
if ( ! function_exists('log_message'))
{
- function log_message($level = 'error', $message, $php_error = FALSE)
+ function log_message($level, $message, $php_error = FALSE)
{
return TRUE;
}
diff --git a/tests/mocks/database/db.php b/tests/mocks/database/db.php
index 7e0030e15..968476dea 100644
--- a/tests/mocks/database/db.php
+++ b/tests/mocks/database/db.php
@@ -106,6 +106,7 @@ class Mock_Database_DB {
$subdriver = self::$subdriver;
$case->ci_vfs_create(array(
'DB_driver.php' => '',
+ 'DB_result.php' => '',
'DB_forge.php' => '',
'DB_query_builder.php' => ''
), '', $case->ci_base_root, 'database');
@@ -113,6 +114,7 @@ class Mock_Database_DB {
{
$case->ci_vfs_create(array(
$driver.'_driver.php' => '',
+ $driver.'_result.php' => '',
$driver.'_forge.php' => ''
), '', $case->ci_base_root, 'database/drivers/'.$driver);
}