diff --git a/.travis.yml b/.travis.yml index 7dcfdfc..8b63dea 100755 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,7 @@ php: - '5.6' - '7.0' - '7.1' + - '7.2' script: - vendor/bin/phpunit install: diff --git a/composer.json b/composer.json index 3edac2c..b0f8a7a 100755 --- a/composer.json +++ b/composer.json @@ -9,11 +9,16 @@ "php": ">=5.6.0" }, "require-dev": { - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^5.7|^6.5" }, "autoload": { "psr-4": { "DbTools\\": "src/" } + }, + "autoload-dev": { + "psr-4": { + "DbTools\\Tests\\": "tests/" + } } } diff --git a/tests/DatabaseTest.php b/tests/DatabaseTest.php index c7f13ae..23bef39 100755 --- a/tests/DatabaseTest.php +++ b/tests/DatabaseTest.php @@ -1,8 +1,12 @@ processRequest([ 'sort' => $sort ]); - if ( $sql ) { - $opt = $test->getModelFilters(); - $this->assertArrayHasKey('order_by', $opt); - $this->assertEquals($sql, $opt['order_by']); - } + + $opt = $test->getModelFilters(); + $this->assertArrayHasKey('order_by', $opt); + $this->assertEquals($sql, $opt['order_by']); } /** diff --git a/tests/TableModelTest.php b/tests/TableModelTest.php index 4b9b4a2..2c83087 100755 --- a/tests/TableModelTest.php +++ b/tests/TableModelTest.php @@ -1,7 +1,14 @@ assertInstanceOf('ConcreteTableModel', $obj); + $this->assertInstanceOf(ConcreteTableModel::class, $obj); $this->assertNotEmpty(ConcreteTableModel::getLastSelectQuery()); }