summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/libraries/Driver_test.php
diff options
context:
space:
mode:
authorGeorge Petculescu <gxgpet@gmail.com>2021-09-26 22:56:39 +0200
committerGeorge Petculescu <gxgpet@gmail.com>2021-10-04 15:36:25 +0200
commit9f6925398097a4f655827dc4030c82d435e27ae8 (patch)
treebd3598444f5fff4240ba0719043cd7c04587334a /tests/codeigniter/libraries/Driver_test.php
parent4fa09ccaa80770ed11a2fdf6f1e28c5e14914be4 (diff)
Adds PHP 8 in Travis
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';