File tree Expand file tree Collapse file tree 6 files changed +32
-64
lines changed Expand file tree Collapse file tree 6 files changed +32
-64
lines changed Original file line number Diff line number Diff line change 11tests /DoctrineTest /doctrine_tests /*
2- * TestCase.php
2+ * TestCase.php
3+ /tests /tmp
Original file line number Diff line number Diff line change 1212 - hhvm
1313 - nightly
1414
15+ services :
16+ - mysql
17+
1518matrix :
1619 include :
1720 - php : " 5.3"
@@ -21,5 +24,8 @@ matrix:
2124 - php : nightly
2225 - php : hhvm
2326
27+ before_install :
28+ - mysql -e 'CREATE DATABASE IF NOT EXISTS test;'
29+
2430script :
25- - php -dshort_open_tag=Off -dmagic_quotes_gpc=Off tests/index .php
31+ - " 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,28 @@ public function testDropDatabases()
164164
165165 public function testConnectionInformationDecoded ()
166166 {
167+ $ conn = null ;
168+ $ thrownException = null ;
167169 $ dsn = 'mysql:// ' . urlencode ('test/t ' ) . ': ' . urlencode ('p@ssword ' ) . '@localhost/ ' . urlencode ('db/name ' );
168170
169- $ conn = Doctrine_Manager::connection ($ dsn );
170- $ options = $ conn ->getOptions ();
171+ try {
172+ $ conn = Doctrine_Manager::connection ($ dsn );
173+ $ options = $ conn ->getOptions ();
171174
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 ' );
175+ $ this ->assertEqual ($ options ['username ' ], 'test/t ' );
176+ $ this ->assertEqual ($ options ['password ' ], 'p@ssword ' );
177+ $ this ->assertEqual ($ options ['dsn ' ], 'mysql:host=localhost;dbname=db/name ' );
178+ } catch (Exception $ e ) {
179+ $ thrownException = $ e ;
180+ }
181+
182+ if (null !== $ conn ) {
183+ Doctrine_Manager::getInstance ()->closeConnection ($ conn );
184+ }
185+
186+ if (null !== $ thrownException ) {
187+ throw $ thrownException ;
188+ }
175189 }
176190 public function prepareData () { }
177191 public function prepareTables () { }
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments