Skip to content
Browse files

Fixing issue with variable number of exceptions in database connectio…

…n testing.
  • Loading branch information...
1 parent 702bb0d commit 3f3820821294a08118e34a7bccdea396e3a8390d @nateabele nateabele committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/cases/data/ConnectionsTest.php
View
4 tests/cases/data/ConnectionsTest.php
@@ -128,6 +128,7 @@ public function testGetNullAdapter() {
}
protected function _canConnect($host, $port) {
+ $expectedExceptions = count($this->_expected);
$this->expectException();
$this->expectException();
@@ -138,6 +139,9 @@ protected function _canConnect($host, $port) {
return true;
}
+ while (count($this->_expected) > $expectedExceptions) {
+ array_pop($this->_expected);
+ }
return false;
}
}

0 comments on commit 3f38208

Please sign in to comment.
Something went wrong with that request. Please try again.