diff options
Diffstat (limited to 'ext/xsl/tests')
-rw-r--r-- | ext/xsl/tests/area_list.xsl | 10 | ||||
-rw-r--r-- | ext/xsl/tests/area_name.xml | 12 | ||||
-rw-r--r-- | ext/xsl/tests/bug26384.phpt | 33 | ||||
-rw-r--r-- | ext/xsl/tests/documentxpath.xsl | 10 | ||||
-rw-r--r-- | ext/xsl/tests/exslt.xml | 10 | ||||
-rw-r--r-- | ext/xsl/tests/exslt.xsl | 46 | ||||
-rw-r--r-- | ext/xsl/tests/prepare.inc | 20 | ||||
-rw-r--r-- | ext/xsl/tests/skipif.inc | 1 | ||||
-rw-r--r-- | ext/xsl/tests/streamsinclude.xsl | 6 | ||||
-rw-r--r-- | ext/xsl/tests/xslt.xml | 28 | ||||
-rw-r--r-- | ext/xsl/tests/xslt.xsl | 26 | ||||
-rw-r--r-- | ext/xsl/tests/xslt.xsl.gz | bin | 395 -> 0 bytes | |||
-rw-r--r-- | ext/xsl/tests/xslt001.phpt | 22 | ||||
-rw-r--r-- | ext/xsl/tests/xslt002.phpt | 29 | ||||
-rw-r--r-- | ext/xsl/tests/xslt003.phpt | 23 | ||||
-rw-r--r-- | ext/xsl/tests/xslt004.phpt | 29 | ||||
-rw-r--r-- | ext/xsl/tests/xslt005.phpt | 31 | ||||
-rw-r--r-- | ext/xsl/tests/xslt006.phpt | 23 | ||||
-rw-r--r-- | ext/xsl/tests/xslt007.phpt | 24 | ||||
-rw-r--r-- | ext/xsl/tests/xslt008.phpt | 28 | ||||
-rw-r--r-- | ext/xsl/tests/xslt009.phpt | 25 | ||||
-rw-r--r-- | ext/xsl/tests/xslt010.phpt | 112 | ||||
-rw-r--r-- | ext/xsl/tests/xslt011.phpt | 51 | ||||
-rw-r--r-- | ext/xsl/tests/xslt011.xml | 1 | ||||
-rw-r--r-- | ext/xsl/tests/xslt011.xsl | 21 |
25 files changed, 0 insertions, 621 deletions
diff --git a/ext/xsl/tests/area_list.xsl b/ext/xsl/tests/area_list.xsl deleted file mode 100644 index e0c88c6215..0000000000 --- a/ext/xsl/tests/area_list.xsl +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - - <xsl:output method="text" encoding="UTF-8"/> - - <xsl:key name="area" match="ROW" use="substring(translate(AREA_NAME, '"', ''), 1, 1)"/> -<xsl:template match="*"> - HERE -</xsl:template> -</xsl:stylesheet> diff --git a/ext/xsl/tests/area_name.xml b/ext/xsl/tests/area_name.xml deleted file mode 100644 index 76cea58511..0000000000 --- a/ext/xsl/tests/area_name.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<AREA_NAME> - <ROW> - <AREA_CODE>13</AREA_CODE> - <AREA_NAME>"Автово" м.</AREA_NAME> - <AREA_NAME_ENG>m."Avtovo"</AREA_NAME_ENG> - </ROW> -</AREA_NAME> - - - diff --git a/ext/xsl/tests/bug26384.phpt b/ext/xsl/tests/bug26384.phpt deleted file mode 100644 index b8f80f8c3e..0000000000 --- a/ext/xsl/tests/bug26384.phpt +++ /dev/null @@ -1,33 +0,0 @@ ---TEST-- -Bug #26384 (domxslt->process causes segfault with xsl:key) ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -$dom = new domDocument; -$dom->load(dirname(__FILE__)."/area_name.xml"); -if(!$dom) { - echo "Error while parsing the document\n"; - exit; -} -$xsl = new domDocument; -$xsl->load(dirname(__FILE__)."/area_list.xsl"); -if(!$xsl) { - echo "Error while parsing the document\n"; - exit; -} -$proc = new xsltprocessor; -if(!$proc) { - echo "Error while making xsltprocessor object\n"; - exit; -} - -$proc->importStylesheet($xsl); -print $proc->transformToXml($dom); - -//this segfaulted before -print $dom->documentElement->firstChild->nextSibling->nodeName; - ---EXPECT-- -HERE -ROW diff --git a/ext/xsl/tests/documentxpath.xsl b/ext/xsl/tests/documentxpath.xsl deleted file mode 100644 index 0e5c5c181d..0000000000 --- a/ext/xsl/tests/documentxpath.xsl +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Id: documentxpath.xsl,v 1.1 2003-10-27 15:12:20 chregu Exp $ --> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > - <xsl:output method="xml" encoding="iso-8859-1" indent="no"/> -<xsl:template match="/"> - -<xsl:value-of select="document('compress.zlib://ext/xsl/tests/xslt.xsl.gz')/xsl:stylesheet/xsl:param/@name"/> -</xsl:template> - - </xsl:stylesheet> diff --git a/ext/xsl/tests/exslt.xml b/ext/xsl/tests/exslt.xml deleted file mode 100644 index 0d9c8eb75b..0000000000 --- a/ext/xsl/tests/exslt.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0"?>
-<page>
- <!-- valid xs:date -->
- <date date="0001-12-31Z"/>
- <date date="3000-01-31"/>
- <date date="2000-02-29"/>
- <date date="9990001-12-31Z"/>
- <date date="-0004-02-29"/>
-</page>
-
diff --git a/ext/xsl/tests/exslt.xsl b/ext/xsl/tests/exslt.xsl deleted file mode 100644 index 06ffd8d60d..0000000000 --- a/ext/xsl/tests/exslt.xsl +++ /dev/null @@ -1,46 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:date="http://exslt.org/dates-and-times"
- extension-element-prefixes="date">
-
-<xsl:output method="text"/>
-
-<xsl:template match="date">
- Test Date : <xsl:value-of select="@date"/>
- <!-- dateTime, date, gYearMonth or gYear; else NaN -->
- year : <xsl:value-of select="date:year(@date)"/>
- <!-- dateTime, date, gYearMonth or gYear; else NaN -->
- leap-year : <xsl:value-of select="date:leap-year(@date)"/>
- <!-- dateTime, date, gYearMonth, gMonth or gMonthDay; else NaN -->
- month-in-year : <xsl:value-of select="date:month-in-year(@date)"/>
- <!-- dateTime, date, gYearMonth or gMonth; else '' -->
- month-name : <xsl:value-of select="date:month-name(@date)"/>
- <!-- dateTime, date, gYearMonth or gMonth; else '' -->
- month-abbreviation : <xsl:value-of select="date:month-abbreviation(@date)"/>
- <!-- dateTime or date; else NaN -->
- week-in-year : <xsl:value-of select="date:week-in-year(@date)"/>
- <!-- dateTime, date; else NaN -->
- day-in-year : <xsl:value-of select="date:day-in-year(@date)"/>
- <!-- dateTime, date, gMonthDay or gDay; else NaN -->
- day-in-month : <xsl:value-of select="date:day-in-month(@date)"/>
- <!-- dateTime, date; else NaN -->
- day-of-week-in-month : <xsl:value-of select="date:day-of-week-in-month(@date)"/>
- <!-- dateTime, date; else NaN -->
- day-in-week : <xsl:value-of select="date:day-in-week(@date)"/>
- <!-- dateTime or date; else NaN -->
- day-name : <xsl:value-of select="date:day-name(@date)"/>
- <!-- dateTime or date; else NaN -->
- day-abbreviation : <xsl:value-of select="date:day-abbreviation(@date)"/>
- <!-- dateTime or time; else '' -->
- time : <xsl:value-of select="date:time(@date)"/>
- <!-- dateTime or time; else NaN -->
- hour-in-day : <xsl:value-of select="date:hour-in-day(@date)"/>
- <!-- dateTime or time; else NaN -->
- minute-in-hour : <xsl:value-of select="date:minute-in-hour(@date)"/>
- <!-- dateTime or time; else NaN -->
- second-in-minute : <xsl:value-of select="date:second-in-minute(@date)"/>
-</xsl:template>
-
-</xsl:stylesheet>
-
diff --git a/ext/xsl/tests/prepare.inc b/ext/xsl/tests/prepare.inc deleted file mode 100644 index bd5bbee40c..0000000000 --- a/ext/xsl/tests/prepare.inc +++ /dev/null @@ -1,20 +0,0 @@ -<?php -$dom = new domDocument; -$dom->load(dirname(__FILE__)."/xslt.xml"); -if(!$dom) { - echo "Error while parsing the document\n"; - exit; -} -$xsl = new domDocument; -$xsl->load(dirname(__FILE__)."/xslt.xsl"); -if(!$xsl) { - echo "Error while parsing the document\n"; - exit; -} -$proc = new xsltprocessor; -if(!$proc) { - echo "Error while making xsltprocessor object\n"; - exit; -} - -?> diff --git a/ext/xsl/tests/skipif.inc b/ext/xsl/tests/skipif.inc deleted file mode 100644 index 0ef73723a3..0000000000 --- a/ext/xsl/tests/skipif.inc +++ /dev/null @@ -1 +0,0 @@ -<?php if (!extension_loaded('xsl')) die('skip xsl extension not available');?> diff --git a/ext/xsl/tests/streamsinclude.xsl b/ext/xsl/tests/streamsinclude.xsl deleted file mode 100644 index 6f8bc40ed9..0000000000 --- a/ext/xsl/tests/streamsinclude.xsl +++ /dev/null @@ -1,6 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Id: streamsinclude.xsl,v 1.1 2003-10-27 15:12:20 chregu Exp $ --> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > - <xsl:output method="xml" encoding="iso-8859-1" indent="no"/> - <xsl:include href="compress.zlib://xslt.xsl.gz"/> -</xsl:stylesheet> diff --git a/ext/xsl/tests/xslt.xml b/ext/xsl/tests/xslt.xml deleted file mode 100644 index b0e9506c7b..0000000000 --- a/ext/xsl/tests/xslt.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version='1.0' encoding="iso-8859-1" ?> -<chapter language="en"> - <title language="en">Title</title> - <para language="ge"> - -<!-- comment --> - <informaltable> - <tgroup cols="3"> - <tbody> - <row> - <entry>a1</entry> - <entry morerows="1">b1</entry> - <entry>c1</entry> - </row> - <row> - <entry>a2</entry> - <entry>c2</entry> - </row> - <row> - <entry>3</entry> - <entry>b3</entry> - <entry>c3</entry> - </row> - </tbody> - </tgroup> - </informaltable> - </para> -</chapter> diff --git a/ext/xsl/tests/xslt.xsl b/ext/xsl/tests/xslt.xsl deleted file mode 100644 index 8331ccc2b5..0000000000 --- a/ext/xsl/tests/xslt.xsl +++ /dev/null @@ -1,26 +0,0 @@ -<?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Id: xslt.xsl,v 1.2 2003-11-29 13:01:19 chregu Exp $ --> -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > - - <xsl:output method="xml" encoding="iso-8859-1" indent="no"/> - <xsl:param name="foo" select="'bar'"/> - <xsl:template match="/"> - <html> - <body> - <xsl:value-of select="$foo"/><xsl:text> -</xsl:text> - <xsl:apply-templates select="/chapter/para/informaltable/tgroup/tbody/row"/> - </body> - </html> - </xsl:template> - - <xsl:template match="row"> - <xsl:for-each select="entry"> - <xsl:value-of select="."/> - <xsl:text> </xsl:text> - </xsl:for-each> - <br/> <xsl:text> -</xsl:text> - - </xsl:template> -</xsl:stylesheet> diff --git a/ext/xsl/tests/xslt.xsl.gz b/ext/xsl/tests/xslt.xsl.gz Binary files differdeleted file mode 100644 index 910bb63c8e..0000000000 --- a/ext/xsl/tests/xslt.xsl.gz +++ /dev/null diff --git a/ext/xsl/tests/xslt001.phpt b/ext/xsl/tests/xslt001.phpt deleted file mode 100644 index 885e7c9824..0000000000 --- a/ext/xsl/tests/xslt001.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Test 1: Transform To XML String ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -echo "Test 1: Transform To XML String"; -include("prepare.inc"); -$proc->importStylesheet($xsl); -print "\n"; -print $proc->transformToXml($dom); -print "\n"; - - ---EXPECT-- -Test 1: Transform To XML String -<?xml version="1.0" encoding="iso-8859-1"?> -<html><body>bar -a1 b1 c1 <br/> -a2 c2 <br/> -3 b3 c3 <br/> -</body></html> diff --git a/ext/xsl/tests/xslt002.phpt b/ext/xsl/tests/xslt002.phpt deleted file mode 100644 index 6c9f0c632c..0000000000 --- a/ext/xsl/tests/xslt002.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Test 2: Transform To HTML String ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -echo "Test 2: Transform To HTML String"; -include("prepare.inc"); -// changing output method to html -$xp = new domxpath($xsl); -$res = $xp->query("/xsl:stylesheet/xsl:output/@method"); -if ($res->length != 1) { - print "No or more than one xsl:output/@method found"; - exit; -} -$res->item(0)->value = "html"; -$proc->importStylesheet($xsl); -print "\n"; -print $proc->transformToXml($dom); -print "\n"; - - ---EXPECT-- -Test 2: Transform To HTML String -<html><body>bar -a1 b1 c1 <br> -a2 c2 <br> -3 b3 c3 <br> -</body></html> diff --git a/ext/xsl/tests/xslt003.phpt b/ext/xsl/tests/xslt003.phpt deleted file mode 100644 index a3c848b1b7..0000000000 --- a/ext/xsl/tests/xslt003.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Test 3: Using Parameters ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -echo "Test 3: Using Parameters"; -include("prepare.inc"); -$proc->importStylesheet($xsl); -$proc->setParameter( "", "foo","hello world"); -print "\n"; -print $proc->transformToXml($dom); -print "\n"; - - ---EXPECT-- -Test 3: Using Parameters -<?xml version="1.0" encoding="iso-8859-1"?> -<html><body>hello world -a1 b1 c1 <br/> -a2 c2 <br/> -3 b3 c3 <br/> -</body></html> diff --git a/ext/xsl/tests/xslt004.phpt b/ext/xsl/tests/xslt004.phpt deleted file mode 100644 index 6e8f476018..0000000000 --- a/ext/xsl/tests/xslt004.phpt +++ /dev/null @@ -1,29 +0,0 @@ ---TEST-- -Test 4: Checking UTF8 Output ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -echo "Test 4: Checking UTF8 Output"; -include("prepare.inc"); -$xp = new domxpath($xsl); -$res = $xp->query("/xsl:stylesheet/xsl:output/@encoding"); -if ($res->length != 1) { - print "No or more than one xsl:output/@encoding found"; - exit; -} -$res->item(0)->value = "utf-8"; -$proc->importStylesheet($xsl); -print "\n"; -print $proc->transformToXml($dom); -print "\n"; - - ---EXPECT-- -Test 4: Checking UTF8 Output -<?xml version="1.0" encoding="utf-8"?> -<html><body>bar -a1 b1 c1 <br/> -a2 c2 <br/> -ä3 b3 c3 <br/> -</body></html> diff --git a/ext/xsl/tests/xslt005.phpt b/ext/xsl/tests/xslt005.phpt deleted file mode 100644 index a70e6ea4f1..0000000000 --- a/ext/xsl/tests/xslt005.phpt +++ /dev/null @@ -1,31 +0,0 @@ ---TEST-- -Test 5: Checking Indent ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -echo "Test 5: Checking Indent"; -include("prepare.inc"); -$xp = new domxpath($xsl); -$res = $xp->query("/xsl:stylesheet/xsl:output/@indent"); -if ($res->length != 1) { - print "No or more than one xsl:output/@indent found"; - exit; -} -$res->item(0)->value = "yes"; -$proc->importStylesheet($xsl); -print "\n"; -print $proc->transformToXml($dom); -print "\n"; - - ---EXPECT-- -Test 5: Checking Indent -<?xml version="1.0" encoding="iso-8859-1"?> -<html> - <body>bar -a1 b1 c1 <br/> -a2 c2 <br/> -3 b3 c3 <br/> -</body> -</html> diff --git a/ext/xsl/tests/xslt006.phpt b/ext/xsl/tests/xslt006.phpt deleted file mode 100644 index 26fada1650..0000000000 --- a/ext/xsl/tests/xslt006.phpt +++ /dev/null @@ -1,23 +0,0 @@ ---TEST-- -Test 6: Transform To Doc ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -echo "Test 6: Transform To Doc"; -include("prepare.inc"); -$proc->importStylesheet($xsl); -print "\n"; -$doc = $proc->transformToDoc($dom); -print $doc->saveXML(); -print "\n"; - - ---EXPECT-- -Test 6: Transform To Doc -<?xml version="1.0" encoding="iso-8859-1"?> -<html><body>bar -a1 b1 c1 <br/> -a2 c2 <br/> -3 b3 c3 <br/> -</body></html> diff --git a/ext/xsl/tests/xslt007.phpt b/ext/xsl/tests/xslt007.phpt deleted file mode 100644 index bc6ad8477a..0000000000 --- a/ext/xsl/tests/xslt007.phpt +++ /dev/null @@ -1,24 +0,0 @@ ---TEST-- -Test 7: Transform To Uri ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -echo "Test 7: Transform To Uri"; -include("prepare.inc"); -$proc->importStylesheet($xsl); -print "\n"; -$doc = $proc->transformToUri($dom, "file://".dirname(__FILE__)."/out.xml"); -print file_get_contents(dirname(__FILE__)."/out.xml"); -unlink(dirname(__FILE__)."/out.xml"); -print "\n"; - - ---EXPECT-- -Test 7: Transform To Uri -<?xml version="1.0" encoding="iso-8859-1"?> -<html><body>bar -a1 b1 c1 <br/> -a2 c2 <br/> -3 b3 c3 <br/> -</body></html> diff --git a/ext/xsl/tests/xslt008.phpt b/ext/xsl/tests/xslt008.phpt deleted file mode 100644 index b6dc37bfd0..0000000000 --- a/ext/xsl/tests/xslt008.phpt +++ /dev/null @@ -1,28 +0,0 @@ ---TEST-- -Test 8: Stream Wrapper Includes ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -echo "Test 8: Stream Wrapper Includes "; -include("prepare.inc"); -$xsl = new domDocument; -$xsl->load(dirname(__FILE__)."/streamsinclude.xsl"); -if(!$xsl) { - echo "Error while parsing the document\n"; - exit; -} -chdir(dirname(__FILE__)); -$proc->importStylesheet($xsl); -print "\n"; -print $proc->transformToXML($dom); - - ---EXPECT-- -Test 8: Stream Wrapper Includes -<?xml version="1.0" encoding="iso-8859-1"?> -<html><body>bar -a1 b1 c1 <br/> -a2 c2 <br/> -3 b3 c3 <br/> -</body></html> diff --git a/ext/xsl/tests/xslt009.phpt b/ext/xsl/tests/xslt009.phpt deleted file mode 100644 index dd8060f4b9..0000000000 --- a/ext/xsl/tests/xslt009.phpt +++ /dev/null @@ -1,25 +0,0 @@ ---TEST-- -Test 9: Stream Wrapper XPath-Document() ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -echo "Test 9: Stream Wrapper XPath-Document()"; -include("prepare.inc"); - -$xsl = new domDocument; -$xsl->load(dirname(__FILE__)."/documentxpath.xsl"); -if(!$xsl) { - echo "Error while parsing the document\n"; - exit; -} - -$proc->importStylesheet($xsl); -print "\n"; -print $proc->transformToXML($dom); - - ---EXPECT-- -Test 9: Stream Wrapper XPath-Document() -<?xml version="1.0" encoding="iso-8859-1"?> -foo diff --git a/ext/xsl/tests/xslt010.phpt b/ext/xsl/tests/xslt010.phpt deleted file mode 100644 index 7c46d030f4..0000000000 --- a/ext/xsl/tests/xslt010.phpt +++ /dev/null @@ -1,112 +0,0 @@ ---TEST-- -Test 10: EXSLT Support ---SKIPIF-- -<?php require_once('skipif.inc'); -$proc = new xsltprocessor; -if (!$proc->hasExsltSupport()) die('skip EXSLT support not available');?> ---FILE-- -<?php -echo "Test 10: EXSLT Support"; - -$dom = new domDocument(); - $dom->load(dirname(__FILE__)."/exslt.xsl"); - $proc = new xsltprocessor; - $xsl = $proc->importStylesheet($dom); - - $xml = new DomDocument(); - $xml->load(dirname(__FILE__)."/exslt.xml"); - - print $proc->transformToXml($xml); ---EXPECT-- -Test 10: EXSLT Support - - - Test Date : 0001-12-31Z - year : 1 - leap-year : false - month-in-year : 12 - month-name : December - month-abbreviation : Dec - week-in-year : 53 - day-in-year : 365 - day-in-month : 31 - day-of-week-in-month : 5 - day-in-week : 2 - day-name : Monday - day-abbreviation : Mon - time : - hour-in-day : NaN - minute-in-hour : NaN - second-in-minute : NaN - - Test Date : 3000-01-31 - year : 3000 - leap-year : false - month-in-year : 1 - month-name : January - month-abbreviation : Jan - week-in-year : 5 - day-in-year : 31 - day-in-month : 31 - day-of-week-in-month : 5 - day-in-week : 6 - day-name : Friday - day-abbreviation : Fri - time : - hour-in-day : NaN - minute-in-hour : NaN - second-in-minute : NaN - - Test Date : 2000-02-29 - year : 2000 - leap-year : true - month-in-year : 2 - month-name : February - month-abbreviation : Feb - week-in-year : 8 - day-in-year : 60 - day-in-month : 29 - day-of-week-in-month : 5 - day-in-week : 3 - day-name : Tuesday - day-abbreviation : Tue - time : - hour-in-day : NaN - minute-in-hour : NaN - second-in-minute : NaN - - Test Date : 9990001-12-31Z - year : 9990001 - leap-year : false - month-in-year : 12 - month-name : December - month-abbreviation : Dec - week-in-year : 53 - day-in-year : 365 - day-in-month : 31 - day-of-week-in-month : 5 - day-in-week : 2 - day-name : Monday - day-abbreviation : Mon - time : - hour-in-day : NaN - minute-in-hour : NaN - second-in-minute : NaN - - Test Date : -0004-02-29 - year : -4 - leap-year : true - month-in-year : 2 - month-name : February - month-abbreviation : Feb - week-in-year : 9 - day-in-year : 60 - day-in-month : 29 - day-of-week-in-month : 5 - day-in-week : 1 - day-name : Sunday - day-abbreviation : Sun - time : - hour-in-day : NaN - minute-in-hour : NaN - second-in-minute : NaN diff --git a/ext/xsl/tests/xslt011.phpt b/ext/xsl/tests/xslt011.phpt deleted file mode 100644 index 39864ffb31..0000000000 --- a/ext/xsl/tests/xslt011.phpt +++ /dev/null @@ -1,51 +0,0 @@ ---TEST-- -Test 11: php:function Support ---SKIPIF-- -<?php require_once('skipif.inc'); ?> ---FILE-- -<?php -print "Test 11: php:function Support\n"; - Class foo { - function foo() {} - function __toString() { return "not a DomNode object";} - } - -$dom = new domDocument(); - $dom->load(dirname(__FILE__)."/xslt011.xsl"); - $proc = new xsltprocessor; - $xsl = $proc->importStylesheet($dom); - - $xml = new DomDocument(); - $xml->load(dirname(__FILE__)."/xslt011.xml"); - $proc->registerPHPFunctions(); - print $proc->transformToXml($xml); - - function foobar($id, $secondArg = "" ) { - if (is_array($id)) { - return $id[0]->value . " - " . $secondArg; - } else { - return $id . " - " . $secondArg; - } - } - function nodeSet($id = null) { - if ($id and is_array($id)) { - return $id[0]; - } else { - $dom = new domdocument; - $dom->loadXML("<root>this is from an external DomDocument</root>"); - return $dom->documentElement; - } - } - function nonDomNode() { - return new foo(); - } ---EXPECTF-- -Test 11: php:function Support - -Warning: xsltprocessor::transformToXml(): A PHP Object can not be converted to a XPath-string in %s on line 16 -<?xml version="1.0"?> -foobar - secondArg -foobar - -this is from an external DomDocument -from the Input Document - diff --git a/ext/xsl/tests/xslt011.xml b/ext/xsl/tests/xslt011.xml deleted file mode 100644 index f40500b0f5..0000000000 --- a/ext/xsl/tests/xslt011.xml +++ /dev/null @@ -1 +0,0 @@ -<doc id="foobar">This is <i>from the Input Document</i></doc> diff --git a/ext/xsl/tests/xslt011.xsl b/ext/xsl/tests/xslt011.xsl deleted file mode 100644 index 55609bbeaa..0000000000 --- a/ext/xsl/tests/xslt011.xsl +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version='1.0'?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:php="http://php.net/xsl" - xsl:extension-element-prefixes="php" - version='1.0'> -<xsl:template match="/"> -<xsl:value-of select="php:functionString('foobar', /doc/@id, 'secondArg')"/> -<xsl:text> -</xsl:text> -<xsl:value-of select="php:function('foobar', /doc/@id)"/> -<xsl:text> -</xsl:text> -<xsl:value-of select="php:function('nodeSet')"/> -<xsl:text> -</xsl:text> -<xsl:value-of select="php:function('nodeSet',/doc)/i"/> -<xsl:text> -</xsl:text> -<xsl:value-of select="php:function('nonDomNode')"/> -</xsl:template> -</xsl:stylesheet> |