[ Index ]
 

Code source de PHP PEAR 1.4.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/tests/Config/test/ -> bug3398.phpt (source)

   1  --TEST--
   2  regression test for bug #3398
   3  --FILE--
   4  <?php
   5  require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc';
   6  $datasrc = dirname(__FILE__) . '/bug3398.ini';
   7  
   8  $root =& $config->parseConfig($datasrc, 'inicommented');
   9  if (PEAR::isError($root)) {
  10      die('Error while reading configuration: ' . $root->getMessage() . "\r\n");
  11  }
  12  
  13  $exp = array( 'root' => array (
  14      'Preset' => array ('presets' => 'common'),
  15      'common' => array (
  16          'sntpTZ' => array(
  17              0 => 'type=4',
  18              1 => 'value=CST6DST5,M4.1.0/02:00:00,M10.5.0/02:00:00',
  19              2 => 'name=sntpTZ',
  20              3 => 'label=TimeZone',
  21              4 => 'form=text',
  22              5 => 'select=array (value => %value, size => 37);')
  23              )
  24      ));
  25  //print_r($root->toArray());
  26  if ($phpt->assertNoErrors('problem!')) {
  27     $phpt->assertEquals($root->toArray(), $exp, 'uh oh');
  28  }
  29  
  30  echo 'tests done'; 
  31  ?>
  32  --EXPECT--
  33  tests done


Généré le : Sun Feb 25 14:08:00 2007 par Balluche grâce à PHPXref 0.7