Permalink
Browse files

Adjust tearDown() to deal with skipped tests (eliminates "PHP Fatal e…

…rror: Call to a member function getObjects() on a non-object").
  • Loading branch information...
1 parent 672a922 commit 498f27efb2cb63a68049744209383bc4d80869d2 @convissor convissor committed Jan 8, 2012
Showing with 6 additions and 0 deletions.
  1. +3 −0 tests/StreamTest.php
  2. +3 −0 tests/Test.php
@@ -81,6 +81,9 @@ protected function setUp()
*/
protected function tearDown()
{
+ if (empty($this->bucket)) {
+ return;
+ }
foreach ($this->bucket->getObjects() as $object) {
$object->delete();
}
View
@@ -66,6 +66,9 @@ protected function setUp()
*/
protected function tearDown()
{
+ if (empty($this->bucket)) {
+ return;
+ }
foreach ($this->bucket->getObjects() as $object) {
$object->delete();
}

0 comments on commit 498f27e

Please sign in to comment.