[ Index ]

PHP Cross Reference of Web Application Component Toolkit

title

Body

[close]

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

   1  <?php
   2  /**
   3   * @package WACT_TESTS
   4   * @version $Id: select.test.php,v 1.4 2004/07/26 22:02:46 jeffmoore Exp $
   5   */
   6  
   7  /**
   8   * @package WACT_TESTS
   9   */
  10  class ExamplesTagsSelectTestCase extends WACTWebTestCase {
  11      function ExamplesTagsSelectTestCase($name = 'WebTestCase') {
  12          $this->WACTWebTestCase($name);
  13      }
  14  
  15      function testExists() {
  16          $this->assertTrue($this->get(WACT_EXAMPLES_HTTP_PATH . '/tags/form/select.php'));
  17          $this->assertNormalPage();
  18      }
  19  
  20      function testNoData() {
  21          $this->assertTrue($this->get(WACT_EXAMPLES_HTTP_PATH . '/tags/form/select.php'));
  22  
  23          $this->assertNormalPage();
  24          $this->assertField('Country', 'United States');
  25          $this->assertField('Colors[]', array('blue', 'red', 'white'));
  26          
  27          $this->assertTrue($this->clickSubmit('Select'));
  28  
  29          $this->assertNormalPage();
  30          $this->assertField('Country', 'United States');
  31          $this->assertField('Colors[]', array('blue', 'red', 'white'));
  32          
  33          $this->assertWantedPattern('/You selected the country United States/');
  34          $this->assertWantedPattern('/You selected the colors\s+blue, red, white/');
  35      }
  36  
  37      function testUk() {
  38          $this->assertTrue($this->get(WACT_EXAMPLES_HTTP_PATH . '/tags/form/select.php'));
  39  
  40          $this->assertNormalPage();
  41          $this->assertField('Country', 'United States');
  42          $this->assertField('Colors[]', array('blue', 'red', 'white'));
  43          
  44          $this->assertTrue($this->setField('Country', 'United Kingdom'));
  45          
  46          $this->assertTrue($this->clickSubmit('Select'));
  47  
  48          $this->assertNormalPage();
  49          $this->assertField('Country', 'United Kingdom');
  50          $this->assertField('Colors[]', array('blue', 'red', 'white'));
  51          
  52          $this->assertWantedPattern('/You selected the country United Kingdom/');
  53          $this->assertWantedPattern('/You selected the colors\s+blue, red, white/');
  54      }
  55  
  56  }
  57  ?>


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