cvs: pear-core /tests/PEAR_PackageFile_Generator_v2/toPackageFile test_fail.phpt /tests/PEAR_PackageFile_Generator_v2/toPackageFile/packagefiles
bundlefail2.xml invalid-1.9.0.tgz

From: Date: Sun, 12 Dec 2004 19:05:45 +0000
Subject: cvs: pear-core /tests/PEAR_PackageFile_Generator_v2/toPackageFile test_fail.phpt /tests/PEAR_PackageFile_Generator_v2/toPackageFile/packagefiles
bundlefail2.xml invalid-1.9.0.tgz
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-cvs+get-27253@lists.php.net to get a copy of this message
cellog Sun Dec 12 14:05:45 2004 EDT Added files: /pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/packagefiles bundlefail2.xml invalid-1.9.0.tgz Modified files: /pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile test_fail.phpt Log: test bundle validation error for bad bundled package http://cvs.php.net/diff.php/pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/test_fail.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/test_fail.phpt diff -u pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/test_fail.phpt:1.2 pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/test_fail.phpt:1.3 --- pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/test_fail.phpt:1.2 Sun Dec 12 14:02:09 2004 +++ pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/test_fail.phpt Sun Dec 12 14:05:45 2004 @@ -112,6 +112,37 @@ ), ), $fakelog->getLog(), 'bad bundle 1 log'); +$pf = &$parser->parse(implode('', file(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'packagefiles' . + DIRECTORY_SEPARATOR . 'bundlefail2.xml')), dirname(__FILE__) . DIRECTORY_SEPARATOR . 'packagefiles' . + DIRECTORY_SEPARATOR . 'bundlefail2.xml'); +$generator = &$pf->getDefaultGenerator(); +$e = $generator->toPackageFile($temp_path, PEAR_VALIDATE_PACKAGING, 'tub.xml'); +$phpunit->assertErrors(array( + array('package' => 'PEAR_Error', 'message' => 'PEAR_Packagefile_v2::toPackageFile: invalid package.xml'), +), 'bad bundle 1'); +$phpunit->assertEquals(array ( + 0 => + array ( + 0 => 1, + 1 => 'Analyzing bundled package fakefoo-1.9.0.tgz', + ), + 1 => + array ( + 0 => 1, + 1 => 'Analyzing bundled package fakebar-1.9.0.tgz', + ), + 2 => + array ( + 0 => 1, + 1 => 'Analyzing bundled package invalid-1.9.0.tgz', + ), + 3 => + array ( + 0 => 1, + 1 => 'ERROR: package invalid-1.9.0.tgz is not a valid package', + ), +), $fakelog->getLog(), 'bad bundle 2 log'); + echo 'tests done'; ?> --EXPECT-- http://cvs.php.net/co.php/pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/packagefiles/bundlefail2.xml?r=1.1&p=1 Index: pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/packagefiles/bundlefail2.xml +++ pear-core/tests/PEAR_PackageFile_Generator_v2/toPackageFile/packagefiles/bundlefail2.xml <?xml version="1.0"?> <package packagerversion="1.4.0a1" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd"> <name>foobundle</name> <channel>pear.php.net</channel> <summary>foo</summary> <description>foo hi there </description> <lead> <name>person</name> <user>single</user> <email>joe@example.com</email> <active>yes</active> </lead> <date>2004-12-10</date> <time>21:51:09</time> <version> <release>1.2.0a1</release> <api>1.2.0a1</api> </version> <stability> <release>alpha</release> <api>alpha</api> </stability> <license uri="http://www.php.net/license/3_0.txt">PHP License</license> <notes>here are the multi-line release notes </notes> <contents> <bundledpackage>fakefoo-1.9.0.tgz</bundledpackage> <bundledpackage>fakebar-1.9.0.tgz</bundledpackage> <bundledpackage>invalid-1.9.0.tgz</bundledpackage> </contents> <dependencies> <required> <php> <min>4.3.0</min> <max>6.0.0</max> </php> <pearinstaller> <min>1.4.0a1</min> </pearinstaller> <package> <name>Console_Getopt</name> <channel>pear.php.net</channel> <max>1.2</max> <exclude>1.2</exclude> </package> </required> <optional> <extension> <name>xmlrpc</name> <min>1.0</min> </extension> </optional> </dependencies> <bundle/> <changelog> <release> <version> <release>1.3.3</release> <api>1.3.3</api> </version> <stability> <release>stable</release> <api>stable</api> </stability> <date>2004-10-28</date> <license uri="http://www.php.net/license/3_0.txt">PHP License</license> <notes>Installer: * fix Bug #1186 raise a notice error on PEAR::Common $_packageName * fix Bug #1249 display the right state when using --force option * fix Bug #2189 upgrade-all stops if dependancy fails * fix Bug #1637 The use of interface causes warnings when packaging with PEAR * fix Bug #1420 Parser bug for T_DOUBLE_COLON * fix Request #2220 pear5 build fails on dual php4/php5 system * fix Bug #1163 pear makerpm fails with packages that supply role=&quot;doc&quot; Other: * add PEAR_Exception class for PHP5 users * fix critical problem in package.xml for linux in 1.3.2 * fix staticPopCallback() in PEAR_ErrorStack * fix warning in PEAR_Registry for windows 98 users </notes> </release> <release> <version> <release>1.3.2</release> <api>1.3.2</api> </version> <stability> <release>stable</release> <api>stable</api> </stability> <date>2004-10-28</date> <license uri="http://www.php.net/license/3_0.txt">PHP License</license> <notes>Installer: * fix Bug #1186 raise a notice error on PEAR::Common $_packageName * fix Bug #1249 display the right state when using --force option * fix Bug #2189 upgrade-all stops if dependancy fails * fix Bug #1637 The use of interface causes warnings when packaging with PEAR * fix Bug #1420 Parser bug for T_DOUBLE_COLON * fix Request #2220 pear5 build fails on dual php4/php5 system * fix Bug #1163 pear makerpm fails with packages that supply role=&quot;doc&quot; Other: * add PEAR_Exception class for PHP5 users * fix critical problem in package.xml for linux in 1.3.2 * fix staticPopCallback() in PEAR_ErrorStack * fix warning in PEAR_Registry for windows 98 users </notes> </release> </changelog> </package>

« previous php.pear.cvs (#27253) next »