summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/libraries/Driver_test.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2021-12-20 14:47:39 +0100
committerGitHub <noreply@github.com>2021-12-20 14:47:39 +0100
commitefc96b71e4b1d13d713d8b2be01796b7d30e6f9b (patch)
tree68a44223c3c9664fbb3bea58c59cde5e3343018d /tests/codeigniter/libraries/Driver_test.php
parent16ab872de21dcf938d9c6243d732b0206c8efa7f (diff)
parente7110e559a0c46d5001368c25ed246ff303d3afe (diff)
Merge pull request #6074 from philsturgeon/ci3-php8
CodeIgniter 3.0 on PHP 8
Diffstat (limited to 'tests/codeigniter/libraries/Driver_test.php')
-rw-r--r--tests/codeigniter/libraries/Driver_test.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/codeigniter/libraries/Driver_test.php b/tests/codeigniter/libraries/Driver_test.php
index e4401e688..ea5cfa235 100644
--- a/tests/codeigniter/libraries/Driver_test.php
+++ b/tests/codeigniter/libraries/Driver_test.php
@@ -5,6 +5,8 @@
*/
class Driver_test extends CI_TestCase {
+ private $name;
+
/**
* Set up test framework
*/
@@ -50,8 +52,8 @@ class Driver_test extends CI_TestCase {
// Was driver loaded?
$this->assertObjectHasAttribute($driver, $this->lib);
- $this->assertAttributeInstanceOf($class, $driver, $this->lib);
- $this->assertAttributeInstanceOf('CI_Driver', $driver, $this->lib);
+ $this->assertInstanceOf($class, $this->lib->$driver);
+ $this->assertInstanceOf('CI_Driver', $this->lib->$driver);
// Was decorate called?
$this->assertObjectHasAttribute($prop, $this->lib->$driver);
@@ -85,8 +87,8 @@ class Driver_test extends CI_TestCase {
// Was driver loaded?
$this->assertObjectHasAttribute($driver, $this->lib);
- $this->assertAttributeInstanceOf($class, $driver, $this->lib);
- $this->assertAttributeInstanceOf('CI_Driver', $driver, $this->lib);
+ $this->assertInstanceOf($class, $this->lib->$driver);
+ $this->assertInstanceOf('CI_Driver', $this->lib->$driver);
// Do we get an error for a non-existent driver?
$this->setExpectedException('RuntimeException', 'CI Error: Unable to load the requested driver: CI_'.
@@ -119,9 +121,9 @@ class Driver_test extends CI_TestCase {
// Was driver loaded?
$this->assertObjectHasAttribute($driver, $this->lib);
- $this->assertAttributeInstanceOf($class, $driver, $this->lib);
- $this->assertAttributeInstanceOf($baseclass, $driver, $this->lib);
- $this->assertAttributeInstanceOf('CI_Driver', $driver, $this->lib);
+ $this->assertInstanceOf($class, $this->lib->$driver);
+ $this->assertInstanceOf($baseclass, $this->lib->$driver);
+ $this->assertInstanceOf('CI_Driver', $this->lib->$driver);
// Create driver extension without base
$driver = 'baseless';