[ Index ]

PHP Cross Reference of Limb3

title

Body

[close]

/wact/tests/cases/compiler/filter/ -> WactFilterDictionaryTest.class.php (source)

   1  <?php
   2  /*
   3   * Limb PHP Framework
   4   *
   5   * @link http://limb-project.com 
   6   * @copyright  Copyright &copy; 2004-2007 BIT(http://bit-creative.com)
   7   * @license    LGPL http://www.gnu.org/copyleft/lesser.html 
   8   */
   9  
  10  require_once('limb/wact/src/compiler/filter/WactFilterDictionary.class.php');
  11  
  12  class WactFilterDictionaryTest extends UnitTestCase
  13  {
  14    function setUp()
  15    {
  16      $this->dict = new WactFilterDictionary();
  17      $this->WactFilterInfo = new WactFilterInfo('TEST', 'Class');
  18      $this->dict->registerFilterInfo($this->WactFilterInfo, $file = 'whatever');
  19    }
  20  
  21    function testgetFilterInfo()
  22    {
  23      $this->assertIsA($this->dict->getFilterInfo('TEST'), 'WactFilterInfo');
  24    }
  25  
  26    function testRegisterFilterInfoOnceOnly()
  27    {
  28      $dictionary = new WactFilterDictionary();
  29      $info1 = new WactFilterInfo('test', 'Class');
  30      $info2 = new WactFilterInfo('test', 'Class');
  31      $dictionary->registerFilterInfo($info1, $file1 = 'whaever1');
  32      $dictionary->registerFilterInfo($info2, $file2 = 'whaever2');
  33  
  34      $this->assertEqual($dictionary->getFilterInfo('test'), $info1);
  35    }
  36  }
  37  ?>


Generated: Mon Dec 1 03:56:46 2008 Cross-referenced by PHPXref 0.7