_file = dirname(__FILE__)."/output-".time().".txt"; $this->_instance = new ConsumerStrategies_FileConsumer(array("file" => $this->_file)); } protected function tearDown() { parent::tearDown(); $this->_instance = null; @unlink($this->_file); } public function testPersist() { $this->_instance->persist(array("msg")); $contents = file_get_contents($this->_file); $this->assertEquals('["msg"]'."\n", $contents); } }