From 0fc740f63cde179d3f2da16bb305ab0b3aa917cc Mon Sep 17 00:00:00 2001 From: Xenofon Spafaridis Date: Wed, 6 Jan 2016 22:07:31 +0200 Subject: [PATCH] Fix disabled setting --- .travis.yml | 12 ++++++++++-- composer.json | 2 +- src/QueryLog.php | 2 +- tests/APP/Bootstrap.php | 2 +- tests/src/QueryLogPostgreSQLTest.php | 4 ++-- tests/src/QueryLogTest.php | 4 ++-- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 46371d4..ed258b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,15 @@ language: php php: - 5.6 + - 7.0 install: - - composer install -script: + - composer self-update + - composer install --no-interaction --dev +before_script: + - mkdir -p build/ + - mkdir -p build/logs +script: - composer test +after_script: + - php vendor/bin/coveralls -v + - php vendor/bin/codacycoverage clover build/logs/clover.xml diff --git a/composer.json b/composer.json index 32bd8c3..cd9f771 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,7 @@ ] }, "scripts": { - "doc": "apigen generate -s ./src -d ./doc --template-theme bootstrap --todo --tree --deprecated --no-source-code --title \"query-log doc\"", + "doc": "apigen generate -s ./src -d ./doc --template-theme bootstrap --todo --tree --deprecated --no-source-code --title \"query-log\"", "test": [ "find src/ -name '*.php' -print0 | xargs -0 -L 1 php -l", "find tests/ -name '*.php' -print0 | xargs -0 -L 1 php -l", diff --git a/src/QueryLog.php b/src/QueryLog.php index 7171bd6..532de38 100644 --- a/src/QueryLog.php +++ b/src/QueryLog.php @@ -138,7 +138,7 @@ public function __construct($settings) public function register($additionalParameters = null) { //Ignore registration if disabled setting is set to true - if (isset($this->setting->disabled) && $this->setting->disabled) { + if (isset($this->settings->disabled) && $this->settings->disabled) { return false; } diff --git a/tests/APP/Bootstrap.php b/tests/APP/Bootstrap.php index 063fb03..f2f4a9e 100644 --- a/tests/APP/Bootstrap.php +++ b/tests/APP/Bootstrap.php @@ -32,7 +32,7 @@ public static function getSettings() $settings = [ 'debug' => true, 'database' => [ - 'adapter' => 'mysql', + 'adapter' => 'Phramework\\Database\\MySQL', 'host' => '', 'username' => '', 'password' => '', diff --git a/tests/src/QueryLogPostgreSQLTest.php b/tests/src/QueryLogPostgreSQLTest.php index 4ac0da2..eb0de4c 100644 --- a/tests/src/QueryLogPostgreSQLTest.php +++ b/tests/src/QueryLogPostgreSQLTest.php @@ -21,8 +21,8 @@ use \Phramework\Extensions\StepCallback; /** -* @license https://www.apache.org/licenses/LICENSE-2.0 Apache-2.0 -* @author Xenofon Spafaridis + * @license https://www.apache.org/licenses/LICENSE-2.0 Apache-2.0 + * @author Xenofon Spafaridis */ class QueryLogPostgreSQLTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/src/QueryLogTest.php b/tests/src/QueryLogTest.php index 07885c6..2cf6a79 100644 --- a/tests/src/QueryLogTest.php +++ b/tests/src/QueryLogTest.php @@ -21,8 +21,8 @@ use \Phramework\Extensions\StepCallback; /** -* @license https://www.apache.org/licenses/LICENSE-2.0 Apache-2.0 -* @author Xenofon Spafaridis + * @license https://www.apache.org/licenses/LICENSE-2.0 Apache-2.0 + * @author Xenofon Spafaridis */ class QueryLogTest extends \PHPUnit_Framework_TestCase {