public function testGetBodyAttributeOrder() { $view = $this->_object->getView(); $conf = new MW_Config_Array(); $conf->set('client/html/catalog/filter/attribute/types', array('color', 'width', 'length')); $helper = new MW_View_Helper_Config_Default($view, $conf); $view->addHelper('config', $helper); $output = $this->_object->getBody(); $regex = '/<fieldset class="attr-color">.*<fieldset class="attr-width">.*<fieldset class="attr-length">/smu'; $this->assertNotContains('<fieldset class="attr-size">', $output); $this->assertRegexp($regex, $output); }
public function testArray() { $start = microtime(true); $paths = array(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'one', dirname(__FILE__) . DIRECTORY_SEPARATOR . 'two'); for ($i = 0; $i < 1000; $i++) { $conf = new MW_Config_Array($paths); $conf->get('test/db/host'); $conf->get('test/db/username'); $conf->get('test/db/password'); } $stop = microtime(true); echo "\n config array: " . ($stop - $start) * 1000 . " msec\n"; }