public function tearDown() { // test that nothing outside our jail is touched $contents = array(); $dh = $this->sourceStorage->opendir(''); while ($file = readdir($dh)) { if ($file !== '.' and $file !== '..') { $contents[] = $file; } } $this->assertEquals(array('foo'), $contents); $this->sourceStorage->cleanUp(); parent::tearDown(); }