[ Index ]

PHP Cross Reference of Web Application Component Toolkit

title

Body

[close]

/tests/cases/examples/tags/form/ -> select_time.test.php (source)

   1  <?php
   2  /**
   3   * @package WACT_TESTS
   4   * @version $Id: select_time.test.php,v 1.2 2004/11/26 21:55:14 quipo Exp $
   5   */
   6  
   7  /**
   8   * @package WACT_TESTS
   9   */
  10  class ExamplesTagsSelectTimeTestCase extends WACTWebTestCase {
  11      function ExamplesTagsSelectTimeTestCase($name = 'WebTestCase') {
  12          $this->WACTWebTestCase($name);
  13      }
  14  
  15      function testExists() {
  16          $this->assertTrue($this->get(WACT_EXAMPLES_HTTP_PATH . '/tags/form/select_time.php'));
  17          $this->assertNormalPage();
  18      }
  19      function testNoData() {
  20          $this->assertTrue($this->get(WACT_EXAMPLES_HTTP_PATH . '/tags/form/select_time.php'));
  21  
  22          $this->assertNormalPage();
  23          $this->assertField('MyTime_Hour', date('H'));
  24          $this->assertField('MyTime_Minute', date('i'));
  25          //$this->assertField('MyTime_Second', date('s'));
  26  
  27          $this->assertTrue($this->clickSubmit('Select'));
  28  
  29          $this->assertNormalPage();
  30          $this->assertField('MyTime_Hour', date('H'));
  31          $this->assertField('MyTime_Minute', date('i'));
  32          //$this->assertField('MyTime_Second', date('s'));
  33      }
  34      function testSetTime() {
  35          $this->assertTrue($this->get(WACT_EXAMPLES_HTTP_PATH . '/tags/form/select_time.php'));
  36  
  37          $this->assertNormalPage();
  38          $this->assertField('MyTime_Hour', date('H'));
  39          $this->assertField('MyTime_Minute', date('i'));
  40          //$this->assertField('MyTime_Second', date('s'));
  41  
  42          $this->assertTrue($this->setField('MyTime_Hour', '01'));
  43          $this->assertTrue($this->setField('MyTime_Minute', '04'));
  44          $this->assertTrue($this->setField('MyTime_Second', '06'));
  45  
  46          $this->assertTrue($this->setField('MyTime2[Hour]', '12'));
  47  
  48  
  49          $this->assertTrue($this->clickSubmit('Select'));
  50  
  51          $this->assertNormalPage();
  52          $this->assertField('MyTime_Hour', '01');
  53          $this->assertField('MyTime_Minute', '04');
  54          $this->assertField('MyTime_Second', '06');
  55  
  56          $this->assertField('MyTime2[Hour]', '12');
  57      }
  58  
  59  }
  60  ?>


Generated: Sun Nov 28 19:36:09 2004 Cross-referenced by PHPXref 0.5