PhpMyObject
[ class tree: PhpMyObject ] [ index: PhpMyObject ] [ all elements ]

Source for file pmo_test_data.php

Documentation is available at pmo_test_data.php

  1. <?php
  2. /**
  3.  * This file contains code that help the test files to setup the test data.
  4.  *
  5.  * This file is part of the PhpMyObject project.
  6.  * 
  7.  * For questions, help, comments, discussion, etc., please join our
  8.  * forum at {@link http://www.developpez.net/forums/forumdisplay.php?f=770}
  9.  * or our mailing list at {@link http://groups.google.com/group/pmo-dev}.
  10.  *
  11.  * PhpMyProject is free software: you can redistribute it and/or modify
  12.  * it under the terms of the GNU General Public License as published by
  13.  * the Free Software Foundation, either version 3 of the License, or
  14.  * (at your option) any later version.
  15.  *
  16.  * This program is distributed in the hope that it will be useful,
  17.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  * GNU General Public License for more details.
  20.  *
  21.  * You should have received a copy of the GNU General Public License
  22.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  23.  *
  24.  * @package    PhpMyObject
  25.  * @author     Nicolas Boiteux <nicolas_boiteux@yahoo.fr>
  26.  * @author     Louis Lapointe <louis.lapointe@gmail.com>
  27.  * @link       http://pmo.developpez.com/
  28.  * @since      PhpMyObject v0.14
  29.  * @version    $Revision: 407 $
  30.  * @copyright  Copyright (c) 2007-2008 Nicolas Boiteux
  31.  * @copyright  Copyright (c) 2008 Louis Lapointe
  32.  * @license    GPLv3 {@link http://www.gnu.org/licenses/gpl}
  33.  * @filesource
  34.  */ 
  35.  
  36.  
  37. /*
  38.  * these vars get included by some test class methods.
  39.  */
  40.  
  41. /**
  42.  * DROPS
  43.  */
  44. $drops array(
  45.     'DROP TABLE IF EXISTS `actor`',
  46.     'DROP INDEX if exists `idx_actor_last_name`'
  47. );
  48.  
  49. /**
  50.  * CREATES
  51.  */
  52. $creates array(
  53.       'CREATE TABLE IF NOT EXISTS `actor` ('
  54.     . '`actor_id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT'
  55.     . ', `first_name` TEXT NOT NULL'
  56.     . ', `last_name` TEXT NOT NULL'
  57.     . ', `last_update` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP'
  58.     . ')',
  59.     ' CREATE INDEX IF NOT EXISTS idx_actor_last_name ON actor(last_name)'
  60. );
  61.  
  62.  
  63. /**
  64.  * DELETES
  65.  */
  66. $deletes array(
  67.     'DELETE FROM `actor`'
  68. );
  69.  
  70. /**
  71.  * INSERTS
  72.  */
  73. $inserts array(
  74.  'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (1,"Nicolas","nico","2006-02-15 05:03:42")'
  75. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (2,"NICK","WAHLBERG","2006-02-15 04:34:33")'
  76. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (3,"ED","CHASE","2006-02-15 04:34:33")'
  77. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (4,"JENNIFER","DAVIS","2006-02-15 04:34:33")'
  78. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (5,"JOHNNY","LOLLOBRIGIDA","2006-02-15 04:34:33")'
  79. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (6,"BETTE","NICHOLSON","2006-02-15 04:34:33")'
  80. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (7,"GRACE","MOSTEL","2006-02-15 04:34:33")'
  81. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (8,"MATTHEW","JOHANSSON","2006-02-15 04:34:33")'
  82. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (9,"JOE","SWANK","2006-02-15 04:34:33")'
  83. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (10,"CHRISTIAN","GABLE","2006-02-15 04:34:33")'
  84. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (11,"ZERO","CAGE","2006-02-15 04:34:33")'
  85. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (12,"KARL","BERRY","2006-02-15 04:34:33")'
  86. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (13,"UMA","WOOD","2006-02-15 04:34:33")'
  87. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (14,"VIVIEN","BERGEN","2006-02-15 04:34:33")'
  88. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (15,"CUBA","OLIVIER","2006-02-15 04:34:33")'
  89. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (16,"FRED","COSTNER","2006-02-15 04:34:33")'
  90. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (17,"HELEN","VOIGHT","2006-02-15 04:34:33")'
  91. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (18,"DAN","TORN","2006-02-15 04:34:33")'
  92. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (19,"BOB","FAWCETT","2006-02-15 04:34:33")'
  93. ,'insert  into `actor`(`actor_id`,`first_name`,`last_name`,`last_update`) values (20,"LUCILLE","TRACY","2006-02-15 04:34:33")'
  94. );

Documentation generated on Wed, 15 Oct 2008 09:18:15 -0400 by phpDocumentor 1.4.1