BugReporter::getId PHP Method

getId() public method

Get the Error ID Code
public getId ( ) : string
return string the file's ID-code.
    public function getId()
    {
        $id = "{$this->m_num}:{$this->m_software}:{$this->m_version}:" . $this->getFileWithoutPath() . ":{$this->m_line}";
        $id = preg_replace('/"/', "'", $id);
        return $id;
    }

Usage Example

 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");
 }