Skip to content

Commit b679884

Browse files
committed
Clean up after passing Collection functional tests
1 parent d24195c commit b679884

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

tests/Collection/CrudSpec/AggregateFunctionalTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,8 @@ public function testAggregateWithOut()
5555
);
5656

5757
$this->assertSame($expected, $outputCollection->find()->toArray());
58+
59+
// Manually clean up our output collection
60+
$this->dropCollectionIfItExists($outputCollection);
5861
}
5962
}

tests/Collection/FunctionalTestCase.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@ public function setUp()
2121
$this->dropCollectionIfItExists($this->collection);
2222
}
2323

24+
public function tearDown()
25+
{
26+
if ($this->hasFailed()) {
27+
return;
28+
}
29+
30+
$this->dropCollectionIfItExists($this->collection);
31+
}
32+
2433
/**
2534
* Drop the collection if it exists.
2635
*

0 commit comments

Comments
 (0)