Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Store MD5 of source files.

  • Loading branch information...
commit 9f9f94ff03312835a434f4386ba72b379452f325 1 parent a520020
@sebastianbergmann authored
Showing with 7 additions and 4 deletions.
  1. +7 −4 PHPUnit/Util/Log/PDO.php
View
11 PHPUnit/Util/Log/PDO.php
@@ -97,6 +97,7 @@ class PHPUnit_Util_Log_PDO implements PHPUnit_Framework_TestListener
run_id INTEGER UNSIGNED NOT NULL REFERENCES run.run_id,
code_file_id INTEGER UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
code_file_name CHAR(255),
+ code_file_md5 CHAR(32),
INDEX (run_id)
) ENGINE=InnoDB;
@@ -169,7 +170,8 @@ class PHPUnit_Util_Log_PDO implements PHPUnit_Framework_TestListener
CREATE TABLE IF NOT EXISTS code_file(
run_id INTEGER,
code_file_id INTEGER PRIMARY KEY AUTOINCREMENT,
- code_file_name TEXT
+ code_file_name TEXT,
+ code_file_md5 TEXT
);
CREATE INDEX IF NOT EXISTS code_file_run_id ON code_file (run_id);
@@ -435,11 +437,12 @@ public function storeCodeCoverage(PHPUnit_Framework_TestResult $result)
$this->dbh->exec(
sprintf(
'INSERT INTO code_file
- (run_id, code_file_name)
- VALUES(%d, "%s");',
+ (run_id, code_file_name, code_file_md5)
+ VALUES(%d, "%s", "%s");',
$this->runId,
- str_replace($commonPath, '', $file)
+ str_replace($commonPath, '', $file),
+ md5_file($file)
)
);
Please sign in to comment.
Something went wrong with that request. Please try again.