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

Source for file UnittestController.php

Documentation is available at UnittestController.php

  1. <?php
  2. /**
  3.  * UnittestController
  4.  * 
  5.  * Copyright (C) 2009  Mai (Me Artificial Intelligence)
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License as published by
  9.  * the Free Software Foundation, either version 3 of the License, or
  10.  * (at your option) any later version.
  11.  *
  12.  * This program is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  * GNU General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU General Public License
  18.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  19.  * 
  20.  * @author Wouter Bulten (wouterbulten@mai-ai.org)
  21.  * @copyright Copyright (C) 2009  Mai (Me Artificial Intelligence)
  22.  * @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3 (GPLv3)
  23.  * @link http://www.launchpad.net/mai
  24.  * 
  25.  * @package Controllers
  26.  * @subpackage Development
  27.  * 
  28.  */
  29.  
  30. /**
  31.  * UnittestController
  32.  * 
  33.  * @author Wouter Bulten (wouterbulten@mai-ai.org)
  34.  * @copyright Copyright (C) 2009  Mai (Me Artificial Intelligence)
  35.  * @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License version 3 (GPLv3)
  36.  * @link http://www.launchpad.net/mai
  37.  * 
  38.  * @package Controllers
  39.  * @subpackage Development
  40.  * 
  41.  *  
  42.  */
  43.  
  44. class UnittestController extends Zend_Controller_Action
  45. {
  46.     public function indexAction()
  47.     {
  48.         Mai::init();
  49.         /* Unit Testing */
  50.         $a array(61012);
  51.         
  52.         $row new Pattern();
  53.         $row->pattern '6-10-12';
  54.         $row->pattern_array $a;
  55.         
  56.         $row->pattern_response '6-10-12';
  57.         $row->pattern_response_array $a;
  58.         
  59.         $row->save();
  60.         
  61.         echo $row->pattern_response_array;
  62.     }
  63. }

Documentation generated on Mon, 27 Jul 2009 19:51:59 +0200 by phpDocumentor 1.4.1