diff options
Diffstat (limited to 'tests/functionals')
-rw-r--r-- | tests/functionals/ApiTest.php | 8 | ||||
-rw-r--r-- | tests/functionals/UserApiTest.php | 6 |
2 files changed, 5 insertions, 9 deletions
diff --git a/tests/functionals/ApiTest.php b/tests/functionals/ApiTest.php index 7f2db321..7576f031 100644 --- a/tests/functionals/ApiTest.php +++ b/tests/functionals/ApiTest.php @@ -10,14 +10,12 @@ class Api extends PHPUnit_Framework_TestCase { if (DB_DRIVER === 'sqlite') { @unlink(DB_FILENAME); - } - else if (DB_DRIVER === 'mysql') { + } elseif (DB_DRIVER === 'mysql') { $pdo = new PDO('mysql:host='.DB_HOSTNAME, DB_USERNAME, DB_PASSWORD); $pdo->exec('DROP DATABASE '.DB_NAME); $pdo->exec('CREATE DATABASE '.DB_NAME); $pdo = null; - } - else if (DB_DRIVER === 'postgres') { + } elseif (DB_DRIVER === 'postgres') { $pdo = new PDO('pgsql:host='.DB_HOSTNAME, DB_USERNAME, DB_PASSWORD); $pdo->exec('DROP DATABASE '.DB_NAME); $pdo->exec('CREATE DATABASE '.DB_NAME.' WITH OWNER '.DB_USERNAME); @@ -1082,4 +1080,4 @@ class Api extends PHPUnit_Framework_TestCase $this->assertEquals('overdue task', $tasks[0]['title']); $this->assertEquals('API test', $tasks[0]['project_name']); } -}
\ No newline at end of file +} diff --git a/tests/functionals/UserApiTest.php b/tests/functionals/UserApiTest.php index 3abb7b28..8a80c706 100644 --- a/tests/functionals/UserApiTest.php +++ b/tests/functionals/UserApiTest.php @@ -12,14 +12,12 @@ class UserApi extends PHPUnit_Framework_TestCase { if (DB_DRIVER === 'sqlite') { @unlink(DB_FILENAME); - } - else if (DB_DRIVER === 'mysql') { + } elseif (DB_DRIVER === 'mysql') { $pdo = new PDO('mysql:host='.DB_HOSTNAME, DB_USERNAME, DB_PASSWORD); $pdo->exec('DROP DATABASE '.DB_NAME); $pdo->exec('CREATE DATABASE '.DB_NAME); $pdo = null; - } - else if (DB_DRIVER === 'postgres') { + } elseif (DB_DRIVER === 'postgres') { $pdo = new PDO('pgsql:host='.DB_HOSTNAME, DB_USERNAME, DB_PASSWORD); $pdo->exec('DROP DATABASE '.DB_NAME); $pdo->exec('CREATE DATABASE '.DB_NAME.' WITH OWNER '.DB_USERNAME); |