cvs: php-src(PHP_5_2) /ext/calendar/tests cal_from_jd.phpt cal_info.phpt easter_date.phpt gregoriantojd.phpt jddayofweek.phpt jdmonthname.phpt
jdtofrench.phpt jdtogregorian.phpt jdtojulian.phpt jdtounix.phpt jewishtojd.phpt juliantojd.phpt unixtojd.phpt /ext/dom/tests domattributes.phpt
domchardata.phpt domelement.phpt /ext/zip/tests 38943.phpt bug38943.phpt /tests/lang catchable_error_001.phpt catchable_error_002.phpt

From: Date: Mon, 09 Oct 2006 16:02:34 +0000
Subject: cvs: php-src(PHP_5_2) /ext/calendar/tests cal_from_jd.phpt cal_info.phpt easter_date.phpt gregoriantojd.phpt jddayofweek.phpt jdmonthname.phpt
jdtofrench.phpt jdtogregorian.phpt jdtojulian.phpt jdtounix.phpt jewishtojd.phpt juliantojd.phpt unixtojd.phpt /ext/dom/tests domattributes.phpt
domchardata.phpt domelement.phpt /ext/zip/tests 38943.phpt bug38943.phpt /tests/lang catchable_error_001.phpt catchable_error_002.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-41027@lists.php.net to get a copy of this message
bjori Mon Oct 9 16:02:34 2006 UTC Added files: (Branch: PHP_5_2) /php-src/ext/calendar/tests cal_from_jd.phpt cal_info.phpt easter_date.phpt gregoriantojd.phpt jddayofweek.phpt jdmonthname.phpt jdtofrench.phpt jdtogregorian.phpt jdtojulian.phpt jdtounix.phpt jewishtojd.phpt juliantojd.phpt unixtojd.phpt /php-src/ext/dom/tests domattributes.phpt domchardata.phpt domelement.phpt /php-src/ext/zip/tests bug38943.phpt /php-src/tests/lang catchable_error_001.phpt catchable_error_002.phpt Removed files: /php-src/ext/zip/tests 38943.phpt Log: MFH tests

http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/cal_from_jd.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/cal_from_jd.phpt +++ php-src/ext/calendar/tests/cal_from_jd.phpt --TEST-- cal_from_jd() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php print_r(cal_from_jd(1748326, CAL_GREGORIAN)); print_r(cal_from_jd(1748324, CAL_JULIAN)); print_r(cal_from_jd( 374867, CAL_JEWISH)); print_r(cal_from_jd( 0, CAL_FRENCH)); ?> --EXPECT-- Array ( [date] => 8/26/74 [month] => 8 [day] => 26 [year] => 74 [dow] => 0 [abbrevdayname] => Sun [dayname] => Sunday [abbrevmonth] => Aug [monthname] => August ) Array ( [date] => 8/26/74 [month] => 8 [day] => 26 [year] => 74 [dow] => 5 [abbrevdayname] => Fri [dayname] => Friday [abbrevmonth] => Aug [monthname] => August ) Array ( [date] => 8/26/74 [month] => 8 [day] => 26 [year] => 74 [dow] => 4 [abbrevdayname] => Thu [dayname] => Thursday [abbrevmonth] => Nisan [monthname] => Nisan ) Array ( [date] => 0/0/0 [month] => 0 [day] => 0 [year] => 0 [dow] => 1 [abbrevdayname] => Mon [dayname] => Monday [abbrevmonth] => [monthname] => ) http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/cal_info.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/cal_info.phpt +++ php-src/ext/calendar/tests/cal_info.phpt --TEST-- cal_info() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php print_r(cal_info()); print_r(cal_info(1)); print_r(cal_info(99999)); ?> --EXPECT-- Array ( [0] => Array ( [months] => Array ( [1] => January [2] => February [3] => March [4] => April [5] => May [6] => June [7] => July [8] => August [9] => September [10] => October [11] => November [12] => December ) [abbrevmonths] => Array ( [1] => Jan [2] => Feb [3] => Mar [4] => Apr [5] => May [6] => Jun [7] => Jul [8] => Aug [9] => Sep [10] => Oct [11] => Nov [12] => Dec ) [maxdaysinmonth] => 31 [calname] => Gregorian [calsymbol] => CAL_GREGORIAN ) [1] => Array ( [months] => Array ( [1] => January [2] => February [3] => March [4] => April [5] => May [6] => June [7] => July [8] => August [9] => September [10] => October [11] => November [12] => December ) [abbrevmonths] => Array ( [1] => Jan [2] => Feb [3] => Mar [4] => Apr [5] => May [6] => Jun [7] => Jul [8] => Aug [9] => Sep [10] => Oct [11] => Nov [12] => Dec ) [maxdaysinmonth] => 31 [calname] => Julian [calsymbol] => CAL_JULIAN ) [2] => Array ( [months] => Array ( [1] => Tishri [2] => Heshvan [3] => Kislev [4] => Tevet [5] => Shevat [6] => AdarI [7] => AdarII [8] => Nisan [9] => Iyyar [10] => Sivan [11] => Tammuz [12] => Av [13] => Elul ) [abbrevmonths] => Array ( [1] => Tishri [2] => Heshvan [3] => Kislev [4] => Tevet [5] => Shevat [6] => AdarI [7] => AdarII [8] => Nisan [9] => Iyyar [10] => Sivan [11] => Tammuz [12] => Av [13] => Elul ) [maxdaysinmonth] => 30 [calname] => Jewish [calsymbol] => CAL_JEWISH ) [3] => Array ( [months] => Array ( [1] => Vendemiaire [2] => Brumaire [3] => Frimaire [4] => Nivose [5] => Pluviose [6] => Ventose [7] => Germinal [8] => Floreal [9] => Prairial [10] => Messidor [11] => Thermidor [12] => Fructidor [13] => Extra ) [abbrevmonths] => Array ( [1] => Vendemiaire [2] => Brumaire [3] => Frimaire [4] => Nivose [5] => Pluviose [6] => Ventose [7] => Germinal [8] => Floreal [9] => Prairial [10] => Messidor [11] => Thermidor [12] => Fructidor [13] => Extra ) [maxdaysinmonth] => 30 [calname] => French [calsymbol] => CAL_FRENCH ) ) Array ( [months] => Array ( [1] => January [2] => February [3] => March [4] => April [5] => May [6] => June [7] => July [8] => August [9] => September [10] => October [11] => November [12] => December ) [abbrevmonths] => Array ( [1] => Jan [2] => Feb [3] => Mar [4] => Apr [5] => May [6] => Jun [7] => Jul [8] => Aug [9] => Sep [10] => Oct [11] => Nov [12] => Dec ) [maxdaysinmonth] => 31 [calname] => Julian [calsymbol] => CAL_JULIAN ) Warning: cal_info(): invalid calendar ID 99999. in /home/hartmut/projects/php/dev/head/ext/calendar/tests/cal_info.php on line 4 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/easter_date.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/easter_date.phpt +++ php-src/ext/calendar/tests/easter_date.phpt --TEST-- easter_date() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo date("Y-m-d", easter_date(2000))."\n"; echo date("Y-m-d", easter_date(2001))."\n"; echo date("Y-m-d", easter_date(2002))."\n"; ?> --EXPECT-- 2000-04-23 2001-04-15 2002-03-31 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/gregoriantojd.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/gregoriantojd.phpt +++ php-src/ext/calendar/tests/gregoriantojd.phpt --TEST-- gregoriantojd() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo gregoriantojd( 0, 0, 0). "\n"; echo gregoriantojd( 1, 1, 1582). "\n"; echo gregoriantojd(10, 5, 1582). "\n"; echo gregoriantojd( 1, 1, 1970). "\n"; echo gregoriantojd( 1, 1, 2999). "\n"; ?> --EXPECT-- 0 2298874 2299151 2440588 2816423 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/jddayofweek.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/jddayofweek.phpt +++ php-src/ext/calendar/tests/jddayofweek.phpt --TEST-- jddayofweek() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php foreach (array(2440588, 2452162, 2453926) as $jd) { echo "### JD $jd ###\n"; for ($mode = 0; $mode <= 2; $mode++) { echo "--- mode $mode ---\n"; for ($offset = 0; $offset <= 7; $offset++) { echo jddayofweek($jd + $offset, $mode). "\n"; } } } ?> --EXPECT-- ### JD 2440588 ### --- mode 0 --- 4 5 6 0 1 2 3 4 --- mode 1 --- Thursday Friday Saturday Sunday Monday Tuesday Wednesday Thursday --- mode 2 --- Thu Fri Sat Sun Mon Tue Wed Thu ### JD 2452162 ### --- mode 0 --- 0 1 2 3 4 5 6 0 --- mode 1 --- Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday --- mode 2 --- Sun Mon Tue Wed Thu Fri Sat Sun ### JD 2453926 ### --- mode 0 --- 0 1 2 3 4 5 6 0 --- mode 1 --- Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday --- mode 2 --- Sun Mon Tue Wed Thu Fri Sat Sun http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/jdmonthname.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/jdmonthname.phpt +++ php-src/ext/calendar/tests/jdmonthname.phpt --TEST-- jddayofweek() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php foreach (array(2440588, 2452162, 2453926) as $jd) { echo "### JD $jd ###\n"; for ($mode = 0; $mode <= 6; $mode++) { echo "--- mode $mode ---\n"; for ($offset = 0; $offset <= 12; $offset++) { echo jddayofweek($jd + $offset * 30, $mode). "\n"; } } } ?> --EXPECT-- ### JD 2440588 ### --- mode 0 --- 4 6 1 3 5 0 2 4 6 1 3 5 0 --- mode 1 --- Thursday Saturday Monday Wednesday Friday Sunday Tuesday Thursday Saturday Monday Wednesday Friday Sunday --- mode 2 --- Thu Sat Mon Wed Fri Sun Tue Thu Sat Mon Wed Fri Sun --- mode 3 --- 4 6 1 3 5 0 2 4 6 1 3 5 0 --- mode 4 --- 4 6 1 3 5 0 2 4 6 1 3 5 0 --- mode 5 --- 4 6 1 3 5 0 2 4 6 1 3 5 0 --- mode 6 --- 4 6 1 3 5 0 2 4 6 1 3 5 0 ### JD 2452162 ### --- mode 0 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 --- mode 1 --- Sunday Tuesday Thursday Saturday Monday Wednesday Friday Sunday Tuesday Thursday Saturday Monday Wednesday --- mode 2 --- Sun Tue Thu Sat Mon Wed Fri Sun Tue Thu Sat Mon Wed --- mode 3 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 --- mode 4 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 --- mode 5 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 --- mode 6 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 ### JD 2453926 ### --- mode 0 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 --- mode 1 --- Sunday Tuesday Thursday Saturday Monday Wednesday Friday Sunday Tuesday Thursday Saturday Monday Wednesday --- mode 2 --- Sun Tue Thu Sat Mon Wed Fri Sun Tue Thu Sat Mon Wed --- mode 3 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 --- mode 4 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 --- mode 5 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 --- mode 6 --- 0 2 4 6 1 3 5 0 2 4 6 1 3 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/jdtofrench.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/jdtofrench.phpt +++ php-src/ext/calendar/tests/jdtofrench.phpt --TEST-- jdtofrench() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo jdtofrench(0). "\n"; echo jdtofrench(2375840). "\n"; echo jdtofrench(2375850). "\n"; echo jdtofrench(2375940). "\n"; echo jdtofrench(2376345). "\n"; echo jdtofrench(2385940). "\n"; ?> --EXPECT-- 0/0/0 1/1/1 1/11/1 4/11/1 5/21/2 0/0/0 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/jdtogregorian.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/jdtogregorian.phpt +++ php-src/ext/calendar/tests/jdtogregorian.phpt --TEST-- jdtogregorian() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo jdtogregorian(0). "\n"; echo jdtogregorian(2298874). "\n"; echo jdtogregorian(2299151). "\n"; echo jdtogregorian(2440588). "\n"; echo jdtogregorian(2816423). "\n"; ?> --EXPECT-- 0/0/0 1/1/1582 10/5/1582 1/1/1970 1/1/2999 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/jdtojulian.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/jdtojulian.phpt +++ php-src/ext/calendar/tests/jdtojulian.phpt --TEST-- jdtojulian() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo jdtojulian(0). "\n"; echo jdtojulian(2298874). "\n"; echo jdtojulian(2299151). "\n"; echo jdtojulian(2440588). "\n"; echo jdtojulian(2816423). "\n"; ?> --EXPECT-- 0/0/0 12/22/1581 9/25/1582 12/19/1969 12/12/2998 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/jdtounix.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/jdtounix.phpt +++ php-src/ext/calendar/tests/jdtounix.phpt --TEST-- jdtounix() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo date("Y-m-d",jdtounix(2440588)). "\n"; echo date("Y-m-d",jdtounix(2452162)). "\n"; echo date("Y-m-d",jdtounix(2453926)). "\n"; ?> --EXPECT-- 1970-01-01 2001-09-09 2006-07-09 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/jewishtojd.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/jewishtojd.phpt +++ php-src/ext/calendar/tests/jewishtojd.phpt --TEST-- jewishtojd() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo jewishtojd(-1,-1,-1). "\n"; echo jewishtojd(0,0,0). "\n"; echo jewishtojd(1,1,1). "\n"; echo jewishtojd(2,22,5763). "\n"; ?> --EXPECT-- 0 0 347998 2452576 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/juliantojd.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/juliantojd.phpt +++ php-src/ext/calendar/tests/juliantojd.phpt --TEST-- juliantojd() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo juliantojd( 0, 0, 0). "\n"; echo juliantojd( 1, 1, 1582). "\n"; echo juliantojd(10, 5, 1582). "\n"; echo juliantojd( 1, 1, 1970). "\n"; echo juliantojd( 1, 1, 2999). "\n"; ?> --EXPECT-- 0 2298884 2299161 2440601 2816443 http://cvs.php.net/viewvc.cgi/php-src/ext/calendar/tests/unixtojd.phpt?view=markup&rev=1.1 Index: php-src/ext/calendar/tests/unixtojd.phpt +++ php-src/ext/calendar/tests/unixtojd.phpt --TEST-- unixtojd() --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php echo unixtojd(40000). "\n"; echo unixtojd(1000000000). "\n"; echo unixtojd(1152459009). "\n"; ?> --EXPECT-- 2440588 2452162 2453926 http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/domattributes.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/domattributes.phpt +++ php-src/ext/dom/tests/domattributes.phpt --TEST-- Attributes: DOMAttribute functionality --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php require_once("dom_test.inc"); $dom = new DOMDocument; $dom->loadXML($xmlstr); if(!$dom) { echo "Error while parsing the document\n"; exit; } $node = $dom->documentElement; $lang = $node->getAttributeNode('language'); echo "Language: ".$lang->value."\n"; $lang->value = 'en-US'; echo "Language: ".$lang->value."\n"; $parent = $lang->ownerElement; $chapter = new DOMAttr("num", "1"); $parent->setAttributeNode($chapter); echo "Is ID?: ".($chapter->isId()?'YES':'NO')."\n"; $top_element = $node->cloneNode(); print $dom->saveXML($top_element); ?> --EXPECT-- Language: en Language: en-US Is ID?: NO <chapter language="en-US" num="1"/> http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/domchardata.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/domchardata.phpt +++ php-src/ext/dom/tests/domchardata.phpt --TEST-- CharData: DOMCharacterData and related functionality --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php require_once("dom_test.inc"); $dom = new DOMDocument; $dom->loadXML($xmlstr); if(!$dom) { echo "Error while parsing the document\n"; exit; } $node = $dom->documentElement; $charnode = $dom->createElement('charnode'); $node->appendChild($charnode); /* DOMComment */ $comment = new DOMComment('Testing character data and extending nodes'); $charnode->appendChild($comment); echo "Comment Length: ".$comment->length."\n"; $comment->data = 'Updated comment'; echo "New Comment Length: ".$comment->length."\n"; echo "New Comment Data: ".$comment->data."\n"; /* DOMCDataSection */ $cdata = new DOMCDataSection('Chars: <>&"'); $charnode->appendChild($cdata); echo "Substring: ".$cdata->substringData(7, 4)."\n"; $cdata->replaceData(10, 1, "'"); echo "New Substring: ".$cdata->substringData(7, 4)."\n"; /* DOMCharacterData using DOMComment */ $comment = new DOMComment('instructions'); echo "Comment Value: ".$comment->data."\n"; $comment->data = 'some more instructions'; echo "New Comment Value: ".$comment->data."\n"; $comment->insertData(10, 'pi '); $comment->replaceData(18, 5, 'i'); $comment->insertData(20, 'g'); $comment->deleteData(13, 2); $comment->deleteData(10, 3); $comment->insertData(10, 'comment '); echo "Updated Comment Value: ".$comment->data."\n"; /* DOMText */ $text = new DOMText('some text characters'); echo "Whole Text: ".$text->wholeText."\n"; $text2 = $text->splitText(9); echo "Split text: ".$text2->wholeText."\n"; $text3 = $text2->splitText(1); echo "Is Whitespace?: ".($text2->isElementContentWhitespace()?'YES':'NO'); ?> --EXPECT-- Comment Length: 42 New Comment Length: 15 New Comment Data: Updated comment Substring: <>&" New Substring: <>&' Comment Value: instructions New Comment Value: some more instructions Updated Comment Value: some more comment strings Whole Text: some text characters Split text: characters Is Whitespace?: YES http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/domelement.phpt?view=markup&rev=1.1 Index: php-src/ext/dom/tests/domelement.phpt +++ php-src/ext/dom/tests/domelement.phpt --TEST-- Elements: DOMElement functionality --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php require_once("dom_test.inc"); $dom = new DOMDocument; $dom->loadXML($xmlstr); if(!$dom) { echo "Error while parsing the document\n"; exit; } $node = $dom->documentElement; echo "Tag Name: ".$node->tagName."\n"; $node->setAttribute('num', '1'); echo "Chapter: ".$node->getAttribute('num')."\n"; echo 'Attribute num exists?: '.($node->hasAttribute('num')?'Yes':'No')."\n"; $node->removeAttribute('num'); echo "Chapter: ".$node->getAttribute('num')."\n"; echo 'Attribute num exists?: '.($node->hasAttribute('num')?'Yes':'No')."\n"; echo "Language: ".$node->getAttribute('language')."\n"; $lang = $node->getAttributeNode('language'); $lang->nodeValue = 'en-US'; $node->setAttributeNode($lang); echo "Language: ".$node->getAttribute('language')."\n"; $node->removeAttributeNode($lang); echo "Language: ".$node->getAttribute('language')."\n"; echo "\n-- xml:lang --\n"; $node->setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:lang', 'en'); echo "Language: ".$node->getAttributeNS('http://www.w3.org/XML/1998/namespace', 'lang')."\n"; echo 'Attribute xml:lang exists?: '.($node->hasAttributeNS('http://www.w3.org/XML/1998/namespace', 'lang')?'Yes':'No')."\n"; $node->removeAttributeNS('http://www.w3.org/XML/1998/namespace', 'lang'); echo "Language: ".$node->getAttributeNS('http://www.w3.org/XML/1998/namespace', 'lang')."\n"; echo 'Attribute xml:lang exists?: '.($node->hasAttributeNS('http://www.w3.org/XML/1998/namespace', 'lang')?'Yes':'No')."\n"; $lang = $dom->createAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:lang'); $lang->nodeValue = 'en-GB'; $node->setAttributeNodeNS($lang); unset($lang); echo "Language: ".$node->getAttributeNS('http://www.w3.org/XML/1998/namespace', 'lang')."\n"; $lang = $node->getAttributeNodeNS('http://www.w3.org/XML/1998/namespace', 'lang'); echo "Language: ".$lang->value."\n"; echo "\n-- Elements --\n"; $rows = $node->getElementsByTagName('row'); echo "Row Count: ".$rows->length."\n"; $element_ns = new DOMElement('newns:myelement', 'default content', 'urn::dummyns'); $node->appendChild($element_ns); $element_ns = new DOMElement('newns2:myelement', 'second default content', 'urn::dummyns'); $node->appendChild($element_ns); $myelements = $node->getElementsByTagNameNS('urn::dummyns', 'myelement'); $mylen = $myelements->length; echo "myelements Count: ".$mylen."\n"; echo "\n-- IDs --\n"; $node->setAttribute('idatt', 'n1'); $node->setIdAttribute('idatt', TRUE); for ($x = 0; $x < $mylen; $x++) { $current = $myelements->item($x); $current->setAttributeNS('urn::dummyns', 'newns:idatt', 'n'.($x+2))."\n"; $current->setIdAttributeNS('urn::dummyns', 'idatt', TRUE); } echo 'Element Name: '.(($elem = $dom->getElementByID('n1'))?$elem->localName:'Not Found')."\n"; $idatt = $node->getAttributeNode('idatt'); $node->setIdAttributeNode($idatt, FALSE); echo 'Element Name: '.(($elem = $dom->getElementByID('n1'))?$elem->localName:'Not Found')."\n"; echo 'Element Name: '.(($elem = $dom->getElementByID('n3'))?$elem->nodeName:'Not Found')."\n"; for ($x = 0; $x < $mylen; $x++) { $node = $myelements->item($x); $node->setIdAttributeNS('urn::dummyns', 'idatt', FALSE); } echo 'Element Name: '.(($elem = $dom->getElementByID('n3'))?$elem->nodeName:'Not Found')."\n"; ?> --EXPECT-- Tag Name: chapter Chapter: 1 Attribute num exists?: Yes Chapter: Attribute num exists?: No Language: en Language: en-US Language: -- xml:lang -- Language: en Attribute xml:lang exists?: Yes Language: Attribute xml:lang exists?: No Language: en-GB Language: en-GB -- Elements -- Row Count: 3 myelements Count: 2 -- IDs -- Element Name: chapter Element Name: Not Found Element Name: newns2:myelement Element Name: Not Found http://cvs.php.net/viewvc.cgi/php-src/ext/zip/tests/bug38943.phpt?view=markup&rev=1.1 Index: php-src/ext/zip/tests/bug38943.phpt +++ php-src/ext/zip/tests/bug38943.phpt --TEST-- #38943, properties in extended class cannot be set --SKIPIF-- <?php /* $Id: bug38943.phpt,v 1.1 2006/09/25 09:17:56 pajoye Exp $ */ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- <?php class myZip extends ZipArchive { private $test = 0; public $testp = 1; private $testarray = array(); public function __construct() { $this->testarray[] = 1; var_dump($this->testarray); } } $z = new myZip; $z->testp = "foobar"; var_dump($z); ?> --EXPECTF-- array(1) { [0]=> int(1) } object(myZip)#1 (%d) { ["test":"myZip":private]=> int(0) ["testp"]=> string(6) "foobar" ["testarray":"myZip":private]=> array(1) { [0]=> int(1) } ["status"]=> int(0) ["statusSys"]=> int(0) ["numFiles"]=> int(0) ["filename"]=> string(0) "" ["comment"]=> string(0) "" } http://cvs.php.net/viewvc.cgi/php-src/tests/lang/catchable_error_001.phpt?view=markup&rev=1.1 Index: php-src/tests/lang/catchable_error_001.phpt +++ php-src/tests/lang/catchable_error_001.phpt --TEST-- Catchable fatal error [1] --FILE-- <?php class Foo { } function blah (Foo $a) { } function error() { $a = func_get_args(); var_dump($a); } blah (new StdClass); echo "ALIVE!\n"; ?> --EXPECTF-- Catchable fatal error: Argument 1 must be an instance of Foo, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php on line 5 http://cvs.php.net/viewvc.cgi/php-src/tests/lang/catchable_error_002.phpt?view=markup&rev=1.1 Index: php-src/tests/lang/catchable_error_002.phpt +++ php-src/tests/lang/catchable_error_002.phpt --TEST-- Catchable fatal error [2] --FILE-- <?php class Foo { } function blah (Foo $a) { } function error() { $a = func_get_args(); var_dump($a); } set_error_handler('error'); blah (new StdClass); echo "ALIVE!\n"; ?> --EXPECTF-- array(5) { [0]=> int(4096) [1]=> string(%d) "Argument 1 must be an instance of Foo, called in %scatchable_error_002.php on line 17 and defined" [2]=> string(%d) "%scatchable_error_002.php" [3]=> int(5) [4]=> array(0) { } } ALIVE!
« previous php.cvs (#41027) next »