diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index 74b04691..4ef728fb 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -1,13 +1,3 @@
-build_failure_conditions:
- #- 'elements.rating(<= D).exists' # No classes/methods with a rating of D or worse
- - 'elements.rating(<= D).new.exists' # No new classes/methods with a rating of D or worse
-
- - 'issues.label("coding-style").new.exists' # No new coding style issues allowed
-
- - 'issues.severity(>= MAJOR).new.exists' # New issues of major or higher severity
-
- - 'project.metric("scrutinizer.quality", < 6)' # Code Quality Rating drops below 6
-
filter:
excluded_paths:
- 'js/modernizr.custom.js'
@@ -24,7 +14,10 @@ imports:
- php
- javascript
+
tools:
+ external_code_coverage: true
+
js_hint:
use_native_config: true
diff --git a/.travis.yml b/.travis.yml
index 8daa537d..5f6f2c51 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,23 +10,33 @@ branches:
- /^stable\d*$/
env:
- - DB=sqlite
- - DB=mysql
-# - DB=pgsql
+ global:
+ - CORE_BRANCH=master
+ matrix:
+ - DB=sqlite
before_install:
- wget https://raw.githubusercontent.com/owncloud/administration/master/travis-ci/before_install.sh
- - bash ./before_install.sh contacts master $DB
-
-# - sudo add-apt-repository -y ppa:chris-lea/node.js
-# - sudo apt-get update
-# - sudo apt-get -y install nodejs
-# - wget https://phantomjs.googlecode.com/files/phantomjs-1.9.0-linux-x86_64.tar.bz2
-# - tar xjf phantomjs-1.9.0-linux-x86_64.tar.bz2
-# - sudo ln -s $(pwd)/phantomjs-1.9.0-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
+ - bash ./before_install.sh contacts $CORE_BRANCH $DB
+ - cd ../core
+ - php occ app:enable contacts
script:
- - sh -c "if [ '$DB' = 'sqlite' ]; then ant test; fi"
- - phpunit --configuration tests/phpunit.xml --testsuite unit-tests
+ - cd apps/contacts
+ - find . -name \*.php -not -path './l10n/*' -exec php -l "{}" \;
+ - phpunit --configuration tests/phpunit.xml --testsuite unit-tests --coverage-clover clover.xml
-#&& make javascript-tests
+ # Create coverage report
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
+ - sh -c "if [ '$TRAVIS_PHP_VERSION' != 'hhvm' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi"
+
+matrix:
+ include:
+ - php: 5.4
+ env: DB=mysql
+# - php: 5.4
+# env: DB=pgsql
+
+ allow_failures:
+ - php: hhvm
+ fast_finish: true
diff --git a/appinfo/info.xml b/appinfo/info.xml
index e441eaef..a2e46593 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -14,7 +14,7 @@
appinfo/remote.php
-
+
166044
diff --git a/build.xml b/build.xml
deleted file mode 100644
index f70da43f..00000000
--- a/build.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 4d4da27a..c09570c3 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -1,12 +1,9 @@
validate($obj::REPAIR|$obj::UPGRADE);
+ $obj->validate($obj::REPAIR);
- $this->assertEquals('3.0', (string)$obj->VERSION);
+ $this->assertEquals('2.1', (string)$obj->VERSION);
$this->assertEquals('Adèle Fermée', (string)$obj->FN);
$this->assertEquals('Fermée;Adèle;;;', (string)$obj->N);
}
public function testEscapedParameters() {
- $carddata = file_get_contents(__DIR__ . '/../data/test6.vcf');
+ $cardData = file_get_contents(__DIR__ . '/../data/test6.vcf');
$obj = \Sabre\VObject\Reader::read(
- $carddata,
+ $cardData,
\Sabre\VObject\Reader::OPTION_IGNORE_INVALID_LINES
);
- $obj->validate($obj::REPAIR|$obj::UPGRADE);
+ $obj->validate($obj::REPAIR);
$this->assertEquals('3.0', (string)$obj->VERSION);
$this->assertEquals('Parameters;Escaped;;;', (string)$obj->N);
- $this->assertEquals('TEL;TYPE=PREF;TYPE=WORK;TYPE=VOICE:123456789' . "\r\n", $obj->TEL->serialize());
+ $this->assertEquals('TEL;TYPE=PREF\,WORK\,VOICE:123456789' . "\r\n", $obj->TEL->serialize());
}
public function testGroupProperty() {
diff --git a/tests/phpunit.xml b/tests/phpunit.xml
index 184047b2..5dbfcb48 100644
--- a/tests/phpunit.xml
+++ b/tests/phpunit.xml
@@ -3,7 +3,6 @@
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
- strict="true"
verbose="true"
colors="true"
>