[Pkg-owncloud-commits] [php-sabredav] 161/220: Fixed a failing MySQL unittest. Now using the sabredav_test mysql db.

David Prévot taffit at moszumanska.debian.org
Thu May 12 01:21:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabredav.

commit 5286e28dc307c84021a7dbd5a3185524f0969cb1
Author: Evert Pot <me at evertpot.com>
Date:   Mon Apr 18 14:51:08 2016 +0800

    Fixed a failing MySQL unittest. Now using the sabredav_test mysql db.
---
 .travis.yml                                    | 2 +-
 tests/Sabre/CalDAV/Backend/AbstractPDOTest.php | 2 +-
 tests/bootstrap.php                            | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 5c03fcc..8e7e04a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,7 +20,7 @@ services:
 sudo: false
 
 before_script:
-  - mysql -e 'create database sabredav'
+  - mysql -e 'create database sabredav_test'
   - phpenv config-rm xdebug.ini; true
   #  - composer self-update
   - composer update --prefer-dist $LOWEST_DEPS
diff --git a/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php b/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
index 9d4af34..5ab300f 100644
--- a/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
+++ b/tests/Sabre/CalDAV/Backend/AbstractPDOTest.php
@@ -1267,7 +1267,7 @@ abstract class AbstractPDOTest extends \PHPUnit_Framework_TestCase {
                 ],
             ])
         ];
-        $this->assertEquals($expected, $result);
+        $this->assertEquals($expected, $result, null, 0.0, 10, true); // Last argument is $canonicalize = true, which allows us to compare, ignoring the order, because it's different between MySQL and Sqlite.
 
     }
 
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index d2c0a22..e99cc66 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -16,7 +16,7 @@ $config = [
     'SABRE_TEMPDIR'   => dirname(__FILE__) . '/temp/',
     'SABRE_HASSQLITE' => in_array('sqlite', PDO::getAvailableDrivers()),
     'SABRE_HASMYSQL'  => in_array('mysql', PDO::getAvailableDrivers()),
-    'SABRE_MYSQLDSN'  => 'mysql:host=127.0.0.1;dbname=sabredav',
+    'SABRE_MYSQLDSN'  => 'mysql:host=127.0.0.1;dbname=sabredav_test',
     'SABRE_MYSQLUSER' => 'root',
     'SABRE_MYSQLPASS' => '',
 ];

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabredav.git



More information about the Pkg-owncloud-commits mailing list