Skip to content

Commit

Permalink
Merge [894].
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Aug 2, 2007
1 parent a0a1f5e commit afe87f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions PHPUnit/Util/Log/CodeCoverage/Database.php
Expand Up @@ -150,19 +150,21 @@ public function storeCodeCoverage(PHPUnit_Framework_TestResult $result, $revisio
'INSERT INTO code_class
(code_file_id, code_class_name,
code_class_start_line, code_class_end_line,
code_class_wmc)
VALUES(:fileId, :className, :startLine, :endLine, 0);'
code_class_dit, code_class_wmc)
VALUES(:fileId, :className, :startLine, :endLine, :dit, 0);'
);

foreach ($classes as $class) {
$className = $class->getName();
$startLine = $class->getStartLine();
$endLine = $class->getEndLine();
$dit = PHPUnit_Util_Class::getDIT( $className );

$stmt->bindParam(':fileId', $fileId, PDO::PARAM_INT);
$stmt->bindParam(':className', $className, PDO::PARAM_STR);
$stmt->bindParam(':startLine', $startLine, PDO::PARAM_INT);
$stmt->bindParam(':endLine', $endLine, PDO::PARAM_INT);
$stmt->bindParam(':dit', $dit, PDO::PARAM_INT);
$stmt->execute();

$classId = $this->dbh->lastInsertId();
Expand Down
1 change: 1 addition & 0 deletions PHPUnit/Util/Log/Database/MySQL.sql
Expand Up @@ -79,6 +79,7 @@ CREATE TABLE IF NOT EXISTS code_class(
code_class_name CHAR(255),
code_class_start_line INTEGER UNSIGNED NOT NULL,
code_class_end_line INTEGER UNSIGNED NOT NULL,
code_class_dit INTEGER UNSIGNED NOT NULL,
code_class_wmc INTEGER UNSIGNED NOT NULL,

INDEX (code_file_id)
Expand Down
1 change: 1 addition & 0 deletions PHPUnit/Util/Log/Database/SQLite3.sql
Expand Up @@ -79,6 +79,7 @@ CREATE TABLE IF NOT EXISTS code_class(
code_class_name TEXT,
code_class_start_line INTEGER,
code_class_end_line INTEGER,
code_class_dit INTEGER,
code_class_wmc INTEGER
);

Expand Down

0 comments on commit afe87f6

Please sign in to comment.