summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codeigniter/core/Input_test.php8
-rw-r--r--tests/codeigniter/database/query_builder/where_test.php2
-rw-r--r--tests/mocks/autoloader.php6
-rw-r--r--tests/mocks/core/common.php2
4 files changed, 9 insertions, 9 deletions
diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php
index a066d9960..cfc80c950 100644
--- a/tests/codeigniter/core/Input_test.php
+++ b/tests/codeigniter/core/Input_test.php
@@ -29,8 +29,8 @@ class Input_test extends CI_TestCase {
$this->assertTrue( ! $this->input->get('foo'));
// Test we're getting empty results
- $this->assertTrue($this->input->get() == NULL);
- $this->assertTrue($this->input->get('foo') == NULL);
+ $this->assertTrue($this->input->get() === NULL);
+ $this->assertTrue($this->input->get('foo') === NULL);
// Test new 3.0 behaviour for non existant results (used to be FALSE)
$this->assertTrue($this->input->get() === NULL);
@@ -70,8 +70,8 @@ class Input_test extends CI_TestCase {
$this->assertTrue( ! $this->input->post());
$this->assertTrue( ! $this->input->post('foo'));
- $this->assertTrue($this->input->post() == NULL);
- $this->assertTrue($this->input->post('foo') == NULL);
+ $this->assertTrue($this->input->post() === NULL);
+ $this->assertTrue($this->input->post('foo') === NULL);
$this->assertTrue($this->input->post() === NULL);
$this->assertTrue($this->input->post('foo') === NULL);
diff --git a/tests/codeigniter/database/query_builder/where_test.php b/tests/codeigniter/database/query_builder/where_test.php
index 607eaa076..6a92c6fce 100644
--- a/tests/codeigniter/database/query_builder/where_test.php
+++ b/tests/codeigniter/database/query_builder/where_test.php
@@ -74,7 +74,7 @@ class Where_test extends CI_TestCase {
*/
public function test_where_custom_string()
{
- $where = "id > 2 AND name != 'Accountant'";
+ $where = "id > 2 AND name !== 'Accountant'";
$jobs = $this->db->where($where)
->get('job')
->result_array();
diff --git a/tests/mocks/autoloader.php b/tests/mocks/autoloader.php
index 441c88944..ff2196d4e 100644
--- a/tests/mocks/autoloader.php
+++ b/tests/mocks/autoloader.php
@@ -50,9 +50,9 @@ function autoload($class)
elseif (in_array($subclass, $ci_libraries))
{
$dir = BASEPATH.'libraries'.DIRECTORY_SEPARATOR;
- $class = ($subclass == 'Driver_Library') ? 'Driver' : $subclass;
+ $class = ($subclass === 'Driver_Library') ? 'Driver' : $subclass;
}
- elseif (preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) == 3)
+ elseif (preg_match('/^CI_DB_(.+)_(driver|forge|result|utility)$/', $class, $m) && count($m) === 3)
{
$driver_path = BASEPATH.'database'.DIRECTORY_SEPARATOR.'drivers'.DIRECTORY_SEPARATOR;
$dir = $driver_path.$m[1].DIRECTORY_SEPARATOR;
@@ -77,7 +77,7 @@ function autoload($class)
// If the autoload call came from `class_exists` or `file_exists`,
// we skipped and return FALSE
- if ($trace[2]['function'] == 'class_exists' OR $trace[2]['function'] == 'file_exists')
+ if ($trace[2]['function'] === 'class_exists' OR $trace[2]['function'] === 'file_exists')
{
return FALSE;
}
diff --git a/tests/mocks/core/common.php b/tests/mocks/core/common.php
index e74576626..e1c493aa0 100644
--- a/tests/mocks/core/common.php
+++ b/tests/mocks/core/common.php
@@ -45,7 +45,7 @@ if ( ! function_exists('load_class'))
{
function load_class($class, $directory = 'libraries', $prefix = 'CI_')
{
- if ($directory != 'core' OR $prefix != 'CI_')
+ if ($directory !== 'core' OR $prefix !== 'CI_')
{
throw new Exception('Not Implemented: Non-core load_class()');
}