felipe          Sat May 16 15:13:57 2009 UTC

  Added files:                 (Branch: PHP_5_3)
    /php-src/ext/xmlwriter/tests        bug48204.phpt 
                                        xmlwriter_open_uri_error_001.phpt 
                                        xmlwriter_open_uri_error_002.phpt 
                                        xmlwriter_open_uri_error_003.phpt 
                                        xmlwriter_open_uri_error_004.phpt 
                                        xmlwriter_open_uri_error_005.phpt 
                                        
xmlwriter_set_indent_string_basic_001.phpt 
                                        
xmlwriter_set_indent_string_error_001.phpt 
                                        
xmlwriter_write_attribute_ns_basic_001.phpt 
                                        
xmlwriter_write_attribute_ns_error_001.phpt 
                                        xmlwriter_write_dtd_basic_001.phpt 
                                        xmlwriter_write_dtd_error_001.phpt 
  Log:
  - New tests (testfest DutchUG)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/bug48204.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/bug48204.phpt
+++ php-src/ext/xmlwriter/tests/bug48204.phpt
--TEST--
xmlwriter_open_uri with PHP_MAXPATHLEN + 1
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php 
$path = str_repeat('a', PHP_MAXPATHLEN + 1);
var_dump(xmlwriter_open_uri('file:///' . $path));
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
Theo van der Zee
#Test Fest Utrecht 09-05-2009
--EXPECTF--

Warning: xmlwriter_open_uri(): Unable to resolve file path in %s on line %d
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_001.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_001.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_001.phpt
--TEST--
xmlwriter_open_uri with empty string as parameter
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php 
var_dump(xmlwriter_open_uri(''));
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
Theo van der Zee
#Test Fest Utrecht 09-05-2009
--EXPECTF--

Warning: xmlwriter_open_uri(): Empty string as source in %s on line %d
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_002.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_002.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_002.phpt
--TEST--
xmlwriter_open_uri without parameter
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php 
var_dump(xmlwriter_open_uri());
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
Theo van der Zee
#Test Fest Utrecht 09-05-2009
--EXPECTF--

Warning: xmlwriter_open_uri() expects exactly %d parameter, %d given in %s on 
line %d
NULL

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_003.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_003.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_003.phpt
--TEST--
xmlwriter_open_uri with non existing file
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php 
var_dump(xmlwriter_open_uri('foo/bar.tmp'));
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
Theo van der Zee
#Test Fest Utrecht 09-05-2009
--XFAIL--
Getting error: xmlNewTextWriterFilename : out of memory!
--EXPECTF--

Warning: xmlwriter_open_uri(%s): failed to open stream: No such file or 
directory in %s on line %d
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_004.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_004.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_004.phpt
--TEST--
xmlwriter_open_uri with file:///
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php 
var_dump(xmlwriter_open_uri('file:///'));
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
Theo van der Zee
#Test Fest Utrecht 09-05-2009
--XFAIL--
Getting error: xmlNewTextWriterFilename : out of memory!
--EXPECTF--

Warning: xmlwriter_open_uri(/): failed to open stream: Is a directory in %s on 
line %d
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_005.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_005.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_open_uri_error_005.phpt
--TEST--
xmlwriter_open_uri with file://localhost/
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php 
var_dump(xmlwriter_open_uri('file://localhost/'));
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
Theo van der Zee
#Test Fest Utrecht 09-05-2009
--XFAIL--
Getting error: xmlNewTextWriterFilename : out of memory!
--EXPECTF--

Warning: xmlwriter_open_uri(/): failed to open stream: Is a directory in %s on 
line %d
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_set_indent_string_basic_001.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_set_indent_string_basic_001.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_set_indent_string_basic_001.phpt
--TEST--
xmlwriter_set_indent_string passing xmlwriter resource
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php 
$temp_filename = dirname(__FILE__)."/xmlwriter_set_indent_string.tmp";
        $fp = fopen($temp_filename, "w");
        fwrite ($fp, "Hi");
        fclose($fp);
$resource = xmlwriter_open_uri($temp_filename);
var_dump(xmlwriter_set_indent_string($resource, '  '));
?>
--CLEAN--
<?php
$temp_filename = dirname(__FILE__)."/xmlwriter_set_indent_string.tmp";
unlink($temp_filename);
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
Theo van der Zee
#Test Fest Utrecht 09-05-2009
--EXPECT--
bool(true)

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_set_indent_string_error_001.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_set_indent_string_error_001.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_set_indent_string_error_001.phpt
--TEST--
xmlwriter_set_indent_string with missing param(s)
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php 
$temp_filename = dirname(__FILE__)."/xmlwriter_set_indent_string_error.tmp";
        $fp = fopen($temp_filename, "w");
        fwrite ($fp, "Hi");
        fclose($fp);
$resource = xmlwriter_open_uri($temp_filename);
var_dump(xmlwriter_set_indent_string($resource));
?>
--CLEAN--
<?php
$temp_filename = dirname(__FILE__)."/xmlwriter_set_indent_string_error.tmp";
unlink($temp_filename);
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
--EXPECTF--

Warning: xmlwriter_set_indent_string() expects exactly %d parameters, %d given 
in %s on line %d
NULL

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_basic_001.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_basic_001.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_basic_001.phpt
--TEST--
xmlwriter_write_attribute_ns basic function tests
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php
$xw = xmlwriter_open_memory();
xmlwriter_set_indent($xw, TRUE);
xmlwriter_start_document($xw, NULL, "UTF-8");
xmlwriter_start_element($xw, 'root');
xmlwriter_write_attribute_ns($xw, 'prefix', 'id', 'http://www.php.net/uri', 
'elem1');
xmlwriter_start_element($xw, 'elem1');
xmlwriter_write_attribute($xw, 'attr1', 'first');
xmlwriter_end_element($xw);
xmlwriter_full_end_element($xw);
xmlwriter_end_document($xw);

$output = xmlwriter_flush($xw, true);
print $output;
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
--EXPECT--
<?xml version="1.0" encoding="UTF-8"?>
<root prefix:id="elem1" xmlns:prefix="http://www.php.net/uri";>
 <elem1 attr1="first"/>
</root>


http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt
--TEST--
xmlwriter_write_attribute_ns with missing param
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php
$xw = xmlwriter_open_memory();
xmlwriter_set_indent($xw, TRUE);
xmlwriter_start_document($xw, NULL, "UTF-8");
xmlwriter_start_element($xw, 'root');
xmlwriter_write_attribute_ns($xw, 'prefix', '', 'http://www.php.net/uri');
xmlwriter_start_element($xw, 'elem1');
xmlwriter_write_attribute($xw, 'attr1', 'first');
xmlwriter_end_element($xw);
xmlwriter_full_end_element($xw);
xmlwriter_end_document($xw);

$output = xmlwriter_flush($xw, true);
print $output;

// write attribute_ns without start_element first
$xw = xmlwriter_open_memory();
var_dump(xmlwriter_write_attribute_ns($xw, 'prefix', 'id', 
'http://www.php.net/uri', 'elem1'));
print xmlwriter_output_memory($xw);
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
--EXPECTF--

Warning: xmlwriter_write_attribute_ns() expects exactly %d parameters, %d given 
in %s on line %d
<?xml version="1.0" encoding="UTF-8"?>
<root>
 <elem1 attr1="first"/>
</root>
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_write_dtd_basic_001.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_write_dtd_basic_001.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_write_dtd_basic_001.phpt
--TEST--
xmlwriter_write_dtd basic function tests
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php

$xmlwriter = xmlwriter_open_memory();
var_dump(xmlwriter_write_dtd($xmlwriter, 'bla1', 'bla2', 'bla3', 'bla4'));
$output = xmlwriter_flush($xmlwriter, true);
print $output . PHP_EOL;

var_dump(xmlwriter_write_dtd($xmlwriter, '', '', ''));
$output = xmlwriter_flush($xmlwriter, true);
print $output;
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
--EXPECT--
bool(true)
<!DOCTYPE bla1 PUBLIC "bla2" "bla3" [bla4]>
bool(false)

http://cvs.php.net/viewvc.cgi/php-src/ext/xmlwriter/tests/xmlwriter_write_dtd_error_001.phpt?view=markup&rev=1.1
Index: php-src/ext/xmlwriter/tests/xmlwriter_write_dtd_error_001.phpt
+++ php-src/ext/xmlwriter/tests/xmlwriter_write_dtd_error_001.phpt
--TEST--
xmlwriter_write_dtd with missing param(s)
--SKIPIF--
<?php if (!extension_loaded("xmlwriter")) print "skip"; ?>
--FILE--
<?php
$xmlwriter = xmlwriter_open_memory();
var_dump(xmlwriter_write_dtd($xmlwriter));
?>
--CREDIT--
Koen Kuipers koen...@gmail.com
--EXPECTF--

Warning: xmlwriter_write_dtd() expects at least %d parameters, %d given in %s 
on line %d
NULL

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to