1--TEST-- 2SPL: RegexIterator::getPregFlags() exception test 3--CREDITS-- 4Lance Kesson jac_kesson@hotmail.com 5#testfest London 2009-05-09 6--FILE-- 7<?php 8 9class myIterator implements Iterator { 10 11function current (){} 12function key ( ){} 13function next ( ){} 14function rewind ( ){} 15function valid ( ){} 16 17 18} 19 20class TestRegexIterator extends RegexIterator{} 21 22$rege = '/^a/'; 23 24 25$r = new TestRegexIterator(new myIterator, $rege); 26 27 28try{ 29 $r->setPregFlags(); 30}catch (Exception $e) { 31 echo $e->getMessage(); 32} 33 34?> 35--EXPECTF-- 36Warning: RegexIterator::setPregFlags() expects exactly 1 parameter, 0 given in %s