summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/database/DB_driver_test.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-11-02 22:33:45 +0100
committerAndrey Andreev <narf@bofh.bg>2012-11-02 22:33:45 +0100
commite24eed7e4e410fabf7479a67d3a27e2596444505 (patch)
treeb751d0553e2a72dc0dbe909b3c7db1fc0d4d2f5c /tests/codeigniter/database/DB_driver_test.php
parent533bf2dd5f36e277a9ee6629ccd667a32b05d154 (diff)
Some micro-optimizations
Diffstat (limited to 'tests/codeigniter/database/DB_driver_test.php')
-rw-r--r--tests/codeigniter/database/DB_driver_test.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codeigniter/database/DB_driver_test.php b/tests/codeigniter/database/DB_driver_test.php
index 9e16e29b4..1f48ca984 100644
--- a/tests/codeigniter/database/DB_driver_test.php
+++ b/tests/codeigniter/database/DB_driver_test.php
@@ -5,7 +5,7 @@ class DB_driver_test extends CI_TestCase {
public function test_initialize()
{
$config = Mock_Database_DB::config(DB_DRIVER);
- $driver_name = current(explode('/', DB_DRIVER));
+ sscanf(DB_DRIVER, '%[^/]/', $driver_name);
$driver = $this->$driver_name($config[DB_DRIVER]);
$this->assertTrue($driver->initialize());