File tree Expand file tree Collapse file tree 7 files changed +380
-170
lines changed Expand file tree Collapse file tree 7 files changed +380
-170
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ matrix:
12
12
env : PREFER_LOWEST="" DB=mysql COVERALLS=true
13
13
- php : 7.1
14
14
env : PREFER_LOWEST="--prefer-lowest" DB=mysql
15
+ - php : 7.1
16
+ env : PREFER_LOWEST="" DB=mysql8
17
+ sudo : required
18
+ services :
19
+ - docker
15
20
- php : 7.1
16
21
env : PREFER_LOWEST="" DB=mariadb
17
22
addons :
@@ -63,7 +68,15 @@ before_script:
63
68
- if [ -z "$NO_WEAKREF" ] ; then pecl install weakref-beta; fi
64
69
script :
65
70
# Let's run the Oracle script only when the password is available (it is not available in forks unfortunately)
66
- - if [ "$DB" != "oracle" ] ; then ./vendor/bin/phpunit $PHPUNITFILE; else docker run -v $(pwd):/app -v $(pwd)/tests/Fixtures/oracle-startup.sql:/docker-entrypoint-initdb.d/oracle-startup.sql moufmouf/oracle-xe-php vendor/bin/phpunit $PHPUNITFILE; fi
71
+ - |
72
+ if [ "$DB" == "oracle" ] ; then
73
+ docker run -v $(pwd):/app -v $(pwd)/tests/Fixtures/oracle-startup.sql:/docker-entrypoint-initdb.d/oracle-startup.sql moufmouf/oracle-xe-php vendor/bin/phpunit $PHPUNITFILE;
74
+ elif [ "$DB" == "mysql8" ] ; then
75
+ sudo /etc/init.d/mysql stop;
76
+ tests/phpunit-mysql8.sh
77
+ else
78
+ ./vendor/bin/phpunit $PHPUNITFILE;
79
+ fi
67
80
- composer phpstan
68
81
- composer require-checker
69
82
after_script :
Original file line number Diff line number Diff line change 34
34
</exclude >
35
35
</whitelist >
36
36
</filter >
37
- <logging >
38
- <log type =" coverage-html" target =" build/coverage" charset =" UTF-8" yui =" true" highlight =" true" />
39
- <log type =" coverage-clover" target =" build/logs/clover.xml" />
40
- </logging >
41
37
</phpunit >
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+
3
+ <phpunit backupGlobals =" false"
4
+ backupStaticAttributes =" false"
5
+ colors =" true"
6
+ convertErrorsToExceptions =" true"
7
+ convertNoticesToExceptions =" true"
8
+ convertWarningsToExceptions =" true"
9
+ processIsolation =" false"
10
+ stopOnFailure =" false"
11
+ bootstrap =" vendor/autoload.php"
12
+ >
13
+ <testsuites >
14
+ <testsuite name =" TDBM Test Suite" >
15
+ <directory >./tests/</directory >
16
+ </testsuite >
17
+ </testsuites >
18
+
19
+ <php >
20
+ <!-- "Real" test database -->
21
+ <var name =" db_host" value =" 127.0.0.1" />
22
+ <var name =" db_username" value =" root" />
23
+ <var name =" db_password" value =" " />
24
+ <var name =" db_name" value =" tdbm_testcase" />
25
+ <var name =" db_port" value =" 3306" />
26
+ <var name =" db_driver" value =" pdo_mysql" />
27
+ </php >
28
+
29
+ <filter >
30
+ <whitelist processUncoveredFilesFromWhitelist =" true" >
31
+ <directory suffix =" .php" >src/</directory >
32
+ <exclude >
33
+ <directory suffix =" .php" >src/Test</directory >
34
+ </exclude >
35
+ </whitelist >
36
+ </filter >
37
+ </phpunit >
Original file line number Diff line number Diff line change @@ -757,7 +757,7 @@ public function testFindObjectsFromSqlHierarchyUp()
757
757
'users ' ,
758
758
'login LIKE :login OR login LIKE :login2 ' ,
759
759
array ('login ' => 'robert.marley ' , 'login2 ' => 'bill.shakespeare ' ),
760
- null ,
760
+ ' users.login DESC ' ,
761
761
null ,
762
762
TDBMObject::class
763
763
);
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Use this file to start a MySQL8 database using Docker and then run the test suite on the MySQL8 database.
4
+
5
+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
6
+ cd $DIR
7
+ cd ..
8
+
9
+ docker run --rm --name mysql8-tdbm-test -p 3306:3306 -p 33060:33060 -e MYSQL_ROOT_PASSWORD= -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -d mysql:8 mysqld --default-authentication-plugin=mysql_native_password
10
+
11
+ # Let's wait for MySQL 8 to start
12
+ sleep 20
13
+
14
+ vendor/bin/phpunit -c phpunit.mysql8.xml
15
+ RESULT_CODE=$?
16
+
17
+ docker stop mysql8-tdbm-test
18
+
19
+ exit $RESULT_CODE
You can’t perform that action at this time.
0 commit comments