cvs: pear /XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_applyColumnStringToRecord throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt throwConfigException_callbackInterface_simpleElementSpec.phpt
/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_applySqlOptionsToRecord throwConfigException_dataOptionWrongType.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt throwConfigException_queryOptionMissing.phpt throwConfigException_sqlOptionWrongType.phpt
/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_getNestedXMLRecord throwConfigException_attributesOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt throwConfigException_encoderNotCallableFunction.! phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt throwConfigException_mapperNotCallableStaticMethod2.phpt
/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions throwConfigException_attributesOptionWrongType.phpt
throwConfigException_callbackInterface_complexAttributeSpec.phpt throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt thro! wConfigException_dataOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt throw
| From: | Lukas Feiler | Date: | Sun, 23 Sep 2007 00:16:05 +0000 |
| Subject: | cvs: pear /XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_applyColumnStringToRecord throwConfigException_callbackInterface_complexAttributeSpec.phpt throwConfigException_callbackInterface_complexElementSpec.phpt throwConfigException_callbackInterface_condition.phpt throwConfigException_callbackInterface_data.phpt throwConfigException_callbackInterface_idColumn.phpt throwConfigException_callbackInterface_simpleAttributeSpec.phpt throwConfigException_callbackInterface_simpleElementSpec.phpt /XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_applySqlOptionsToRecord throwConfigException_dataOptionWrongType.phpt throwConfigException_mergeselectiveOptionWrongType.phpt throwConfigException_queryOptionMissing.phpt throwConfigException_sqlOptionWrongType.phpt /XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_getNestedXMLRecord throwConfigException_attributesOptionWrongType.phpt throwConfigException_elementsOptionWrongType.phpt throwConfigException_encoderNotCallableFunction.! phpt throwConfigException_encoderNotCallableNonstaticMethod.phpt throwConfigException_encoderNotCallableStaticMethod1.phpt throwConfigException_encoderNotCallableStaticMethod2.phpt throwConfigException_idcolumnOptionMissing.phpt throwConfigException_mapperNotCallableFunction.phpt throwConfigException_mapperNotCallableNonstaticMethod.phpt throwConfigException_mapperNotCallableStaticMethod1.phpt throwConfigException_mapperNotCallableStaticMethod2.phpt /XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions throwConfigException_attributesOptionWrongType.phpt throwConfigException_callbackInterface_complexAttributeSpec.phpt throwConfigException_callbackInterface_complexElementSpec.phpt throwConfigException_callbackInterface_condition.phpt throwConfigException_callbackInterface_data.phpt throwConfigException_callbackInterface_idColumn.phpt throwConfigException_callbackInterface_simpleAttributeSpec.phpt throwConfigException_callbackInterface_simpleElementSpec.phpt thro! wConfigException_dataOptionWrongType.phpt throwConfigException_elementsOptionWrongType.phpt throwConfigException_encoderNotCallableFunction.phpt throwConfigException_encoderNotCallableNonstaticMethod.phpt throwConfigException_encoderNotCallableStaticMethod1.phpt throwConfigException_encoderNotCallableStaticMethod2.phpt throw |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-48649@lists.php.net to get a copy of this message | ||
lukasfeiler Sun Sep 23 00:16:05 2007 UTC
Added files:
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
throwConfigException_dataOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
throwConfigException_dataOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
throwConfigException_dataOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
throwConfigException_dataOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
throwConfigException_dataOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
throwConfigException_dataOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
throwConfigException_valueOptionMissing.phpt
Removed files:
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_applyColumnStringToRecord
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_applySqlOptionsToRecord
throwConfigException_dataOptionWrongType.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_getNestedXMLRecord
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_processComplexElementSpecification
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_applyColumnStringToRecord
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_applySqlOptionsToRecord
throwConfigException_dataOptionWrongType.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_getNestedXMLRecord
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_processComplexElementSpecification
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_applyColumnStringToRecord
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_applySqlOptionsToRecord
throwConfigException_dataOptionWrongType.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_getNestedXMLRecord
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_processComplexElementSpecification
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/DB/_applyColumnStringToRecord
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/DB/_applySqlOptionsToRecord
throwConfigException_dataOptionWrongType.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/DB/_getNestedXMLRecord
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/DB/_processComplexElementSpecification
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_applyColumnStringToRecord
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_applySqlOptionsToRecord
throwConfigException_dataOptionWrongType.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_getNestedXMLRecord
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_processComplexElementSpecification
throwConfigException_valueOptionMissing.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_applyColumnStringToRecord
throwConfigException_callbackInterface_complexAttributeSpec.phpt
throwConfigException_callbackInterface_complexElementSpec.phpt
throwConfigException_callbackInterface_condition.phpt
throwConfigException_callbackInterface_data.phpt
throwConfigException_callbackInterface_idColumn.phpt
throwConfigException_callbackInterface_simpleAttributeSpec.phpt
throwConfigException_callbackInterface_simpleElementSpec.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_applySqlOptionsToRecord
throwConfigException_dataOptionWrongType.phpt
throwConfigException_mergeselectiveOptionWrongType.phpt
throwConfigException_queryOptionMissing.phpt
throwConfigException_sqlOptionWrongType.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_getNestedXMLRecord
throwConfigException_attributesOptionWrongType.phpt
throwConfigException_elementsOptionWrongType.phpt
throwConfigException_encoderNotCallableFunction.phpt
throwConfigException_encoderNotCallableNonstaticMethod.phpt
throwConfigException_encoderNotCallableStaticMethod1.phpt
throwConfigException_encoderNotCallableStaticMethod2.phpt
throwConfigException_idcolumnOptionMissing.phpt
throwConfigException_mapperNotCallableFunction.phpt
throwConfigException_mapperNotCallableNonstaticMethod.phpt
throwConfigException_mapperNotCallableStaticMethod1.phpt
throwConfigException_mapperNotCallableStaticMethod2.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_processComplexElementSpecification
throwConfigException_valueOptionMissing.phpt
Modified files:
/pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory
throwConfigException.phpt
/pear/XML_Query2XML/tests/XML_Query2XML/PDO db_init.php
Log:
moved unit tests; PDO/db_init.php now also provides MyPDOStatement::fetchAll()
http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt?r1=1.2&r2=1.3&diff_format=u Index: pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt diff -u pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt:1.2 pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt:1.3 --- pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt:1.2 Sat Feb 3 11:11:42 2007 +++ pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt Sun Sep 23 00:16:04 2007 @@ -10,4 +10,4 @@ } ?> --EXPECT-- -XML_Query2XML_ConfigException: Argument passed to the XML_Query2XML constructor is not an instance of DB_common, MDB2_Driver_Common or ADOConnection. +XML_Query2XML_ConfigException: Argument passed to the XML_Query2XML constructor is not an instance of DB_common, MDB2_Driver_Common, ADOConnection or PDO. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php?r1=1.1&r2=1.2&diff_format=u Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php diff -u pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php:1.1 pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php:1.2 --- pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php:1.1 Mon Sep 3 08:01:41 2007 +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php Sun Sep 23 00:16:04 2007 @@ -15,7 +15,7 @@ * @license http://www.gnu.org/copyleft/lesser.html LGPL Version 2.1 * @author Lukas Feiler <lukas.feiler@lukasfeiler.com> * @package XML_Query2XML -* @version $Id: db_init.php,v 1.1 2007/09/03 08:01:41 lukasfeiler Exp $ +* @version $Id: db_init.php,v 1.2 2007/09/23 00:16:04 lukasfeiler Exp $ */ class MyPDOStatement extends PDOStatement @@ -42,6 +42,28 @@ } return $newRecord; } + + /**Does what PDO::ATTR_FETCH_TABLE_NAMES was supposed to do. + */ + public function fetchAll() + { + $records = parent::fetchAll(); + if (is_array($records)) { + $newRecords = array(); + for ($i = 0; $i < count($records); $i++) { + foreach ($records[$i] as $key => $value) { + $newKey = $key; + if (strpos($newKey, '.') !== false) { + $newKey = substr($newKey, strpos($newKey, '.') + 1); + } + $newRecords[$i][$newKey] = $value; + } + } + return $newRecords; + } else { + return $records; + } + } } require_once dirname(dirname(__FILE__)) . '/settings.php'; http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification.
http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt?r1=1.2&r2=1.3&diff_format=u Index: pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt diff -u pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt:1.2 pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt:1.3 --- pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt:1.2 Sat Feb 3 11:11:42 2007 +++ pear/XML_Query2XML/tests/XML_Query2XML/NoDBLayer/factory/throwConfigException.phpt Sun Sep 23 00:16:04 2007 @@ -10,4 +10,4 @@ } ?> --EXPECT-- -XML_Query2XML_ConfigException: Argument passed to the XML_Query2XML constructor is not an instance of DB_common, MDB2_Driver_Common or ADOConnection. +XML_Query2XML_ConfigException: Argument passed to the XML_Query2XML constructor is not an instance of DB_common, MDB2_Driver_Common, ADOConnection or PDO. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php?r1=1.1&r2=1.2&diff_format=u Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php diff -u pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php:1.1 pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php:1.2 --- pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php:1.1 Mon Sep 3 08:01:41 2007 +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/db_init.php Sun Sep 23 00:16:04 2007 @@ -15,7 +15,7 @@ * @license http://www.gnu.org/copyleft/lesser.html LGPL Version 2.1 * @author Lukas Feiler <lukas.feiler@lukasfeiler.com> * @package XML_Query2XML -* @version $Id: db_init.php,v 1.1 2007/09/03 08:01:41 lukasfeiler Exp $ +* @version $Id: db_init.php,v 1.2 2007/09/23 00:16:04 lukasfeiler Exp $ */ class MyPDOStatement extends PDOStatement @@ -42,6 +42,28 @@ } return $newRecord; } + + /**Does what PDO::ATTR_FETCH_TABLE_NAMES was supposed to do. + */ + public function fetchAll() + { + $records = parent::fetchAll(); + if (is_array($records)) { + $newRecords = array(); + for ($i = 0; $i < count($records); $i++) { + foreach ($records[$i] as $key => $value) { + $newKey = $key; + if (strpos($newKey, '.') !== false) { + $newKey = substr($newKey, strpos($newKey, '.') + 1); + } + $newRecords[$i][$newKey] = $value; + } + } + return $newRecords; + } else { + return $records; + } + } } require_once dirname(dirname(__FILE__)) . '/settings.php'; http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbDefault/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbException/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/ADOdbPEAR/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/DB/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/MDB2/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_attributesOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "attributes" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][attributes]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_complexElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a complex element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][value]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_condition.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a condition specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test{} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => array( 'value' => 'title', 'condition' => new Test() ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title][condition]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_data.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_data.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_data.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for data specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_store', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'albums' => array( 'idColumn' => 'albumid', 'sql' => array( 'data' => array( new Test() ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'elements' => array( 'title' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][sql][data][0]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_idColumn.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a idColumn specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM artist, album WHERE album.artist_id = artist.artistid", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'artistid', 'elements' => array( 'name', 'albums' => array( 'idColumn' => new Test(), 'elements' => array( 'title' ) ) ) ) ); $dom->formatOutput = true; print $dom->saveXML(); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][albums][idColumn]: string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleAttributeSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple attribute specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'attributes' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [attributes][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_callbackInterface_simpleElementSpec.phpt --TEST-- XML_Query2XML::_applyColumnStringToRecord(): check for XML_Query2XML_ConfigException - using the callback interface for a simple element specification --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once 'XML/Query2XML/Callback.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; class Test {} $query2xml = XML_Query2XML::factory($db); try { $dom =& $query2xml->getXML( "SELECT * FROM album", array( 'rootTag' => 'music_store', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title' => new Test() ) ) ); } catch (XML_Query2XML_ConfigException $e) { print $e->getMessage(); } ?> --EXPECT-- [elements][title]: array, string or instance of XML_Query2XML_Callback expected, object given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_dataOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "data" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => 1, 'query' => 'SELECT * FROM some_table' ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql][data]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_elementsOptionWrongType.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "elements" is not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => 1 ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][elements]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - encoder function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Encoder { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => array(new Encoder(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "Encoder::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'encoder' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_encoderNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static encoder method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'encoder' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][encoder]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_idcolumnOptionMissing.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - "idColumn" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn ' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: The configuration option "idColumn" is missing on the root level. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableFunction.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - mapper function not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'noSuchFunction', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "noSuchFunction" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableNonstaticMethod.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - non-static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php class Mapper { } require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => array(new Mapper(), 'noSuchMethod'), 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "Mapper::noSuchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod1.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'mapper' => 'No:suchMethod', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mapperNotCallableStaticMethod2.phpt --TEST-- XML_Query2XML::_getNestedXMLRecord(): check for XML_Query2XML_ConfigException - static mapper method not callable --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'mapper' => 'No:suchMethod', 'elements' => array( '*' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][mapper]: The method/function "No:suchMethod" is not callable. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_mergeselectiveOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "merge_selective" not an array --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array( 'data' => array( 'artistid' ), 'query' => 'SELECT * FROM album WHERE artist_id = ?' ), 'sql_options' => array( 'merge_master' => true, 'merge_selective' => 1 ), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql_options][merge_selective]: array expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_queryOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_queryOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_queryOptionMissing.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "query" missing --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => array(), 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: The configuration option "query" is missing. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_sqlOptionWrongType.phpt --TEST-- XML_Query2XML::_applySqlOptionsToRecord(): check for XML_Query2XML_ConfigException - "sql" not an array or string --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist LEFT JOIN album ON album.artist_id = artist.artistid", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'elements' => array( 'artistid', 'name', 'birth_year', 'birth_place', 'genre', 'albums' => array( 'sql' => 1, 'rootTag' => 'albums', 'rowTag' => 'album', 'idColumn' => 'albumid', 'elements' => array( 'albumid' => 'albumid', 'title', 'published_year', 'comment' ) ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } ?> --EXPECT-- XML_Query2XML_ConfigException: [elements][albums][sql]: array or string expected, integer given. http://cvs.php.net/viewvc.cgi/pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_valueOptionMissing.phpt?view=markup&rev=1.1 Index: pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_valueOptionMissing.phpt +++ pear/XML_Query2XML/tests/XML_Query2XML/PDO/_preprocessOptions/throwConfigException_valueOptionMissing.phpt --TEST-- XML_Query2XML::_processComplexElementSpecification(): check for XML_Query2XML_ConfigException - missing "value" option --SKIPIF-- <?php require_once dirname(dirname(__FILE__)) . '/skipif.php'; ?> --FILE-- <?php require_once 'XML/Query2XML.php'; require_once dirname(dirname(__FILE__)) . '/db_init.php'; try { $query2xml =& XML_Query2XML::factory($db); $query2xml->getXML( "SELECT * FROM artist", array( 'rootTag' => 'music_library', 'rowTag' => 'artist', 'idColumn' => 'artistid', 'attributes' => array( '*' => '*', 'genre' => array( 'condition' => '#genreEqualsSoul()', ) ) ) ); } catch (XML_Query2XML_ConfigException $e) { echo get_class($e) . ': ' . $e->getMessage(); } function genreEqualsSoul($record) { return $record["genre"] == "Soul"; } ?> --EXPECT-- XML_Query2XML_ConfigException: [attributes][genre][value]: Mandatory option "value" missing from the complex attribute specification.