diff options
author | George Petculescu <gxgpet@gmail.com> | 2021-09-26 22:56:39 +0200 |
---|---|---|
committer | George Petculescu <gxgpet@gmail.com> | 2021-10-04 15:36:25 +0200 |
commit | 9f6925398097a4f655827dc4030c82d435e27ae8 (patch) | |
tree | bd3598444f5fff4240ba0719043cd7c04587334a /tests/codeigniter/libraries/Driver_test.php | |
parent | 4fa09ccaa80770ed11a2fdf6f1e28c5e14914be4 (diff) |
Adds PHP 8 in Travis
Diffstat (limited to 'tests/codeigniter/libraries/Driver_test.php')
-rw-r--r-- | tests/codeigniter/libraries/Driver_test.php | 16 |
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'; |