public function getId() { $id = "{$this->m_num}:{$this->m_software}:{$this->m_version}:" . $this->getFileWithoutPath() . ":{$this->m_line}"; $id = preg_replace('/"/', "'", $id); return $id; }
function test_getId_withSlashes () { $reporter = new BugReporter (2, "bad bad error", "/non-dir/file.php", 3, "Campsite", "2.5.0"); $errId = $reporter->getId(); $this->assertEqual($errId, "2:Campsite:2.5.0:file.php:3"); }