public function testSortPersistent() { $ts = new TodosEx(); $ts->loadFromFile('todo.txt'); $file = tempnam(sys_get_temp_dir(), 'otodo'); $ts->sort(array('done' => true, 'due' => true, 'priority' => false, 'text' => false)); $ts->saveToFile($file); $this->assertEquals(sha1_file('todo.txt'), sha1_file($file)); unlink($file); }