From 33a9e306258fc7df9dfd9b208df7e5911833a46d Mon Sep 17 00:00:00 2001 From: Bartek Fabiszewski Date: Thu, 28 Feb 2019 11:03:41 +0100 Subject: [PATCH] Fix tests --- .tests/lib/BaseDatabaseTestCase.php | 2 +- .tests/lib/UloggerAPITestCase.php | 2 +- .tests/lib/UloggerDatabaseTestCase.php | 2 +- .travis.yml | 3 +- composer.json | 4 +- composer.lock | 72 +++++++++++++++++++++++--- 6 files changed, 71 insertions(+), 14 deletions(-) diff --git a/.tests/lib/BaseDatabaseTestCase.php b/.tests/lib/BaseDatabaseTestCase.php index b321b79..cf7108f 100644 --- a/.tests/lib/BaseDatabaseTestCase.php +++ b/.tests/lib/BaseDatabaseTestCase.php @@ -41,7 +41,7 @@ abstract class BaseDatabaseTestCase extends PHPUnit_Extensions_Database_TestCase public static function setUpBeforeClass() { if (file_exists(__DIR__ . '/../.env')) { - $dotenv = new Dotenv\Dotenv(__DIR__ . '/..'); + $dotenv = Dotenv\Dotenv::create(__DIR__ . '/..'); $dotenv->load(); $dotenv->required(['DB_DSN', 'DB_USER', 'DB_PASS']); } diff --git a/.tests/lib/UloggerAPITestCase.php b/.tests/lib/UloggerAPITestCase.php index 0bd4fb4..d22773e 100644 --- a/.tests/lib/UloggerAPITestCase.php +++ b/.tests/lib/UloggerAPITestCase.php @@ -10,7 +10,7 @@ class UloggerAPITestCase extends BaseDatabaseTestCase { public function setUp() { parent::setUp(); if (file_exists(__DIR__ . '/../.env')) { - $dotenv = new Dotenv\Dotenv(__DIR__ . '/..'); + $dotenv = Dotenv\Dotenv::create(__DIR__ . '/..'); $dotenv->load(); $dotenv->required(['ULOGGER_URL']); } diff --git a/.tests/lib/UloggerDatabaseTestCase.php b/.tests/lib/UloggerDatabaseTestCase.php index 70133e3..f47ad79 100644 --- a/.tests/lib/UloggerDatabaseTestCase.php +++ b/.tests/lib/UloggerDatabaseTestCase.php @@ -12,7 +12,7 @@ class UloggerDatabaseTestCase extends BaseDatabaseTestCase { parent::setUpBeforeClass(); if (file_exists(__DIR__ . '/../.env')) { - $dotenv = new Dotenv\Dotenv(__DIR__ . '/..'); + $dotenv = Dotenv\Dotenv::create(__DIR__ . '/..'); $dotenv->load(); $dotenv->required(['DB_DSN', 'DB_USER', 'DB_PASS']); } diff --git a/.travis.yml b/.travis.yml index e468052..21fd9c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,7 @@ language: php sudo: required php: - - 5.6 - - 7.3 + - 7.2 env: matrix: diff --git a/composer.json b/composer.json index f4480ef..f53bf7f 100644 --- a/composer.json +++ b/composer.json @@ -8,6 +8,8 @@ "require-dev": { "phpunit/phpunit": "^5.7", "vlucas/phpdotenv": "^3.3", - "guzzlehttp/guzzle": "^6.3" + "guzzlehttp/guzzle": "^6.3", + "phpunit/dbunit": "^2.0" + } } diff --git a/composer.lock b/composer.lock index 4b46a7d..d352563 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "d0a42401c92b52fba7604da126e30ef1", + "content-hash": "e0409bcb302c1bef7caa031dafc841a9", "packages": [ { "name": "ulrichsg/getopt-php", @@ -604,6 +604,62 @@ ], "time": "2018-08-05T17:53:17+00:00" }, + { + "name": "phpunit/dbunit", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/dbunit.git", + "reference": "5c35d74549c21ba55d0ea74ba89d191a51f8cf25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/dbunit/zipball/5c35d74549c21ba55d0ea74ba89d191a51f8cf25", + "reference": "5c35d74549c21ba55d0ea74ba89d191a51f8cf25", + "shasum": "" + }, + "require": { + "ext-pdo": "*", + "ext-simplexml": "*", + "php": "^5.4 || ^7.0", + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0", + "symfony/yaml": "^2.1 || ^3.0" + }, + "bin": [ + "dbunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "DbUnit port for PHP/PHPUnit to support database interaction testing.", + "homepage": "https://github.com/sebastianbergmann/dbunit/", + "keywords": [ + "database", + "testing", + "xunit" + ], + "abandoned": true, + "time": "2016-12-02T14:39:14+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "4.0.8", @@ -1658,20 +1714,20 @@ }, { "name": "symfony/yaml", - "version": "v4.2.3", + "version": "v3.4.22", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "d461670ee145092b7e2a56c1da7118f19cadadb0" + "reference": "ba11776e9e6c15ad5759a07bffb15899bac75c2d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/d461670ee145092b7e2a56c1da7118f19cadadb0", - "reference": "d461670ee145092b7e2a56c1da7118f19cadadb0", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ba11776e9e6c15ad5759a07bffb15899bac75c2d", + "reference": "ba11776e9e6c15ad5759a07bffb15899bac75c2d", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": "^5.5.9|>=7.0.8", "symfony/polyfill-ctype": "~1.8" }, "conflict": { @@ -1686,7 +1742,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1713,7 +1769,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2019-01-16T20:35:37+00:00" + "time": "2019-01-16T10:59:17+00:00" }, { "name": "vlucas/phpdotenv",