/[drupal]/contributions/modules/code_coverage/code_coverage.install
ViewVC logotype

Contents of /contributions/modules/code_coverage/code_coverage.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Sat Jun 28 05:33:14 2008 UTC (16 months, 4 weeks ago) by cwgordon7
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +8 -2 lines
File MIME type: text/x-php
Now fully working, and ~1000 times faster.
1 <?php
2 // $Id: code_coverage.install,v 1.1 2008/06/27 20:50:58 cwgordon7 Exp $
3
4 /**
5 * Implementation of hook_install().
6 */
7 function code_coverage_install() {
8 drupal_install_schema('code_coverage');
9 }
10
11 /**
12 * Implementation of hook_uninstall().
13 */
14 function code_coverage_uninstall() {
15 drupal_uninstall_schema('code_coverage');
16 }
17
18 /**
19 * Implementation of hook_schema().
20 */
21 function code_coverage_schema() {
22 $schema = array();
23
24 $schema['code_coverage'] = array(
25 'description' => t('A log of Drupal\'s code coverage.'),
26 'fields' => array(
27 'cid' => array(
28 'description' => t('The coverage id of this set of coverage tests.'),
29 'type' => 'int',
30 'not null' => TRUE,
31 'default' => 0,
32 ),
33 'filename' => array(
34 'description' => t('The path to the file of this line of code (absolute).'),
35 'type' => 'varchar',
36 'length' => 255,
37 'not null' => TRUE,
38 'default' => '',
39 ),
40 'line' => array(
41 'description' => t('The line number of the line of code.'),
42 'type' => 'int',
43 'not null' => TRUE,
44 'default' => 0,
45 ),
46 'times' => array(
47 'description' => t('The number of times the line of code has been hit while running tests.'),
48 'type' => 'int',
49 'size' => 'big',
50 'not null' => TRUE,
51 'default' => 0,
52 ),
53 ),
54 'primary key' => array('cid', 'filename', 'line'),
55 );
56
57 return $schema;
58 }

  ViewVC Help
Powered by ViewVC 1.1.2