nlopess         Tue Sep  5 14:55:56 2006 UTC

  Added files:                 (Branch: PHP_5_2)
    /php-src/ext/tidy/tests     020.phpt 

  Modified files:              
    /php-src/ext/tidy   tidy.c 
  Log:
  finish the cleaning. also add a new test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tidy.c?r1=1.66.2.8.2.10&r2=1.66.2.8.2.11&diff_format=u
Index: php-src/ext/tidy/tidy.c
diff -u php-src/ext/tidy/tidy.c:1.66.2.8.2.10 
php-src/ext/tidy/tidy.c:1.66.2.8.2.11
--- php-src/ext/tidy/tidy.c:1.66.2.8.2.10       Tue Sep  5 13:50:22 2006
+++ php-src/ext/tidy/tidy.c     Tue Sep  5 14:55:56 2006
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: tidy.c,v 1.66.2.8.2.10 2006/09/05 13:50:22 nlopess Exp $ */
+/* $Id: tidy.c,v 1.66.2.8.2.11 2006/09/05 14:55:56 nlopess Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -31,9 +31,6 @@
 #include "ext/standard/info.h"
 #include "safe_mode.h"
 
-#include "Zend/zend_exceptions.h"
-#include "Zend/zend_object_handlers.h"
-
 #include "tidy.h"
 #include "buffio.h"
 
@@ -276,13 +273,10 @@
 static TIDY_DOC_METHOD(parseFile);
 static TIDY_DOC_METHOD(parseString);
 
-static TIDY_NODE_METHOD(__construct);
 static TIDY_NODE_METHOD(hasChildren);
 static TIDY_NODE_METHOD(hasSiblings);
 static TIDY_NODE_METHOD(isComment);
 static TIDY_NODE_METHOD(isHtml);
-static TIDY_NODE_METHOD(isXhtml);
-static TIDY_NODE_METHOD(isXml);
 static TIDY_NODE_METHOD(isText);
 static TIDY_NODE_METHOD(isJste);
 static TIDY_NODE_METHOD(isAsp);
@@ -353,7 +347,6 @@
 };
 
 static zend_function_entry tidy_funcs_node[] = {
-       TIDY_NODE_ME(__construct, NULL)
        TIDY_NODE_ME(hasChildren, NULL)
        TIDY_NODE_ME(hasSiblings, NULL)
        TIDY_NODE_ME(isComment, NULL)
@@ -1034,7 +1027,7 @@
        php_info_print_table_start();
        php_info_print_table_header(2, "Tidy support", "enabled");
        php_info_print_table_row(2, "libTidy Release", (char 
*)tidyReleaseDate());
-       php_info_print_table_row(2, "Extension Version", 
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.10 2006/09/05 13:50:22 
nlopess Exp $)");
+       php_info_print_table_row(2, "Extension Version", 
PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.66.2.8.2.11 2006/09/05 14:55:56 
nlopess Exp $)");
        php_info_print_table_end();
 
        DISPLAY_INI_ENTRIES();
@@ -1601,13 +1594,6 @@
 }
 /* }}} */
 
-/* {{{ proto tidyNode::tidyNode()
-   Constructor. */
-static TIDY_NODE_METHOD(__construct)
-{      
-}
-/* }}} */
-
 /* {{{ proto boolean tidyNode::hasChildren()
    Returns true if this node has children */
 static TIDY_NODE_METHOD(hasChildren)

http://cvs.php.net/viewvc.cgi/php-src/ext/tidy/tests/020.phpt?view=markup&rev=1.1
Index: php-src/ext/tidy/tests/020.phpt
+++ php-src/ext/tidy/tests/020.phpt
--TEST--
OO API
--SKIPIF--
<?php if (!extension_loaded("tidy")) print "skip"; ?>
--FILE--
<?php
declare(encoding='latin1');

$tidy = new tidy();
$str  = b<<<EOF
<p>Isto é um texto em Português<br>
para testes.</p>
EOF;

$tidy->parseString($str, array('output-xhtml'=>1), 'latin1');
$tidy->cleanRepair();
$tidy->diagnose();
var_dump(tidy_warning_count($tidy) > 0);
var_dump(strlen($tidy->errorBuffer) > 50);

echo $tidy;
?>
--EXPECT--
bool(true)
bool(true)
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<title></title>
</head>
<body>
<p>Isto é um texto em Português<br />
para testes.</p>
</body>
</html>

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

Reply via email to