File tree Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Expand file tree Collapse file tree 3 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 1111 - hhvm
1212 - nightly
1313
14+ services :
15+ - mysql
16+
1417matrix :
1518 include :
1619 - php : " 5.3"
@@ -20,5 +23,8 @@ matrix:
2023 - php : nightly
2124 - php : hhvm
2225
26+ before_install :
27+ - mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
28+
2329script :
24- - php -dshort_open_tag=Off -dmagic_quotes_gpc=Off tests/index .php
30+ - " cd tests && php -dshort_open_tag=Off -dmagic_quotes_gpc=Off run .php"
Original file line number Diff line number Diff line change @@ -49,7 +49,10 @@ public function testConnection()
4949
5050class Doctrine_Connection_Test extends Doctrine_Connection_Common
5151{
52-
52+ /**
53+ * @var string $driverName the name of this connection driver
54+ */
55+ protected $ driverName = 'Mock ' ;
5356}
5457
5558class Doctrine_Adapter_Test implements Doctrine_Adapter_Interface
Original file line number Diff line number Diff line change @@ -164,14 +164,24 @@ public function testDropDatabases()
164164
165165 public function testConnectionInformationDecoded ()
166166 {
167+ $ e = null ;
167168 $ dsn = 'mysql:// ' . urlencode ('test/t ' ) . ': ' . urlencode ('p@ssword ' ) . '@localhost/ ' . urlencode ('db/name ' );
168169
169- $ conn = Doctrine_Manager::connection ($ dsn );
170- $ options = $ conn ->getOptions ();
170+ try {
171+ $ conn = Doctrine_Manager::connection ($ dsn );
172+ $ options = $ conn ->getOptions ();
171173
172- $ this ->assertEqual ($ options ['username ' ], 'test/t ' );
173- $ this ->assertEqual ($ options ['password ' ], 'p@ssword ' );
174- $ this ->assertEqual ($ options ['dsn ' ], 'mysql:host=localhost;dbname=db/name ' );
174+ $ this ->assertEqual ($ options ['username ' ], 'test/t ' );
175+ $ this ->assertEqual ($ options ['password ' ], 'p@ssword ' );
176+ $ this ->assertEqual ($ options ['dsn ' ], 'mysql:host=localhost;dbname=db/name ' );
177+ } catch (Exception $ e ) {
178+ }
179+
180+ Doctrine_Manager::getInstance ()->closeConnection ($ conn );
181+
182+ if (null !== $ e ) {
183+ throw $ e ;
184+ }
175185 }
176186 public function prepareData () { }
177187 public function prepareTables () { }
You can’t perform that action at this time.
0 commit comments