function testGetRulesFromIni() { $cache_manager = new ImageCacheManager(); registerTestingIni( 'image_cache.ini', ' [rule1] path_regex = /root/test1 [rule2] path_regex = /root/test2 groups[] = members groups[] = visitors [not_valid_rule] path_regex = /root/test3 ' ); $this->toolkit->setReturnValue('getINI', getIni('image_cache.ini'), array('image_cache.ini')); $this->assertEqual($cache_manager->getRules(), array( array('path_regex' => '/root/test1'), array('path_regex' => '/root/test2', 'groups' => array('members', 'visitors')) ) ); clearTestingIni(); }