]> granicus.if.org Git - php/commitdiff
fix unit tests for 1.4.0dev3
authorGreg Beaver <cellog@php.net>
Sun, 30 May 2004 17:02:34 +0000 (17:02 +0000)
committerGreg Beaver <cellog@php.net>
Sun, 30 May 2004 17:02:34 +0000 (17:02 +0000)
pear/tests/pear_channelfile.phpt
pear/tests/pear_dependency_checkPackage.phpt
pear/tests/pear_installer4.phpt
pear/tests/pear_installer_install_channels.phpt
pear/tests/pear_packager.phpt
pear/tests/pear_registry.phpt

index 826892eda714df3e148d9ebfa98850a761b161e5..838c57fbcb176a6fde3d60162eb633f7ed565ba9 100644 (file)
@@ -139,20 +139,8 @@ bool(true)
 array(6) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -162,7 +150,7 @@ array(6) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -224,15 +212,27 @@ array(6) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
 }
 string(823) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
@@ -257,20 +257,8 @@ bool(true)
 array(6) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -280,7 +268,7 @@ array(6) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -342,15 +330,27 @@ array(6) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
 }
 string(823) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
@@ -376,20 +376,8 @@ bool(true)
 array(6) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -399,7 +387,7 @@ array(6) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -461,15 +449,27 @@ array(6) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
 }
 string(823) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
@@ -494,20 +494,8 @@ bool(true)
 array(6) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -517,7 +505,7 @@ array(6) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -579,15 +567,27 @@ array(6) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
 }
 string(823) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
@@ -612,20 +612,8 @@ test add packagenameregex
 array(7) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -635,7 +623,7 @@ array(7) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -697,18 +685,30 @@ array(7) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
   ["packagenameregex"]=>
   string(6) "[A-Z]+"
 }
 string(868) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <packagenameregex>[A-Z]+</packagenameregex>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
@@ -733,20 +733,8 @@ bool(true)
 array(7) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -758,7 +746,7 @@ array(7) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -820,16 +808,28 @@ array(7) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
 }
 string(868) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <packagenameregex>[A-Z]+</packagenameregex>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
@@ -854,20 +854,8 @@ test add protocols
 array(8) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -879,7 +867,7 @@ array(8) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -941,6 +929,18 @@ array(8) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
   ["provides"]=>
   array(3) {
     [1]=>
@@ -973,7 +973,7 @@ array(8) {
 string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <provides>
@@ -983,7 +983,7 @@ string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?>
  </provides>
  <packagenameregex>[A-Z]+</packagenameregex>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
@@ -1008,20 +1008,8 @@ bool(true)
 array(8) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -1061,7 +1049,7 @@ array(8) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -1123,11 +1111,23 @@ array(8) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
 }
 string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <provides>
@@ -1137,7 +1137,7 @@ string(1065) "<?xml version="1.0" encoding="ISO-8859-1" ?>
  </provides>
  <packagenameregex>[A-Z]+</packagenameregex>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
@@ -1162,20 +1162,8 @@ test add mirror
 array(9) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -1215,7 +1203,7 @@ array(9) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -1277,6 +1265,18 @@ array(9) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
   ["mirrors"]=>
   array(1) {
     [1]=>
@@ -1312,7 +1312,7 @@ array(9) {
 string(1313) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <provides>
@@ -1330,7 +1330,7 @@ string(1313) "<?xml version="1.0" encoding="ISO-8859-1" ?>
   </mirror>
  </mirrors>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
@@ -1355,20 +1355,8 @@ bool(true)
 array(9) {
   ["version"]=>
   string(3) "1.0"
-  ["deps"]=>
-  array(1) {
-    [1]=>
-    array(3) {
-      ["type"]=>
-      string(3) "php"
-      ["rel"]=>
-      string(2) "ge"
-      ["version"]=>
-      string(5) "5.0.0"
-    }
-  }
   ["name"]=>
-  string(5) "PEAR5"
+  string(5) "pear5"
   ["summary"]=>
   string(23) "PEAR packages for PHP 5"
   ["server"]=>
@@ -1402,7 +1390,7 @@ array(9) {
     }
   }
   ["packagenameregex"]=>
-  string(12) "release.list"
+  string(6) "[A-Z]+"
   ["mirrors"]=>
   array(1) {
     [1]=>
@@ -1439,7 +1427,7 @@ array(9) {
     [1]=>
     array(4) {
       ["name"]=>
-      string(8) "PEAR5.qa"
+      string(8) "pear5.qa"
       ["server"]=>
       string(15) "qa.pear.php.net"
       ["summary"]=>
@@ -1501,11 +1489,23 @@ array(9) {
       }
     }
   }
+  ["deps"]=>
+  array(1) {
+    [1]=>
+    array(3) {
+      ["type"]=>
+      string(3) "php"
+      ["rel"]=>
+      string(2) "ge"
+      ["version"]=>
+      string(5) "5.0.0"
+    }
+  }
 }
-string(1319) "<?xml version="1.0" encoding="ISO-8859-1" ?>
+string(1313) "<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/channel-1.0">
 <channel version="1.0">
- <name>PEAR5</name>
+ <name>pear5</name>
  <summary>PEAR packages for PHP 5</summary>
  <server>pear.php.net</server>
  <provides>
@@ -1513,7 +1513,7 @@ string(1319) "<?xml version="1.0" encoding="ISO-8859-1" ?>
   <protocol type="xml-rpc" version="1.0">release.list</protocol>
   <protocol type="get" version="1.0"/>
  </provides>
- <packagenameregex>release.list</packagenameregex>
+ <packagenameregex>[A-Z]+</packagenameregex>
  <mirrors>
   <mirror type="server" name="mirror.php.net">
    <provides>
@@ -1523,7 +1523,7 @@ string(1319) "<?xml version="1.0" encoding="ISO-8859-1" ?>
   </mirror>
  </mirrors>
  <subchannels>
-  <subchannel name="PEAR5.qa" server="qa.pear.php.net">
+  <subchannel name="pear5.qa" server="qa.pear.php.net">
    <summary>Quality Assurance releases of unmaintained packages</summary>
    <deps>
     <dep type="pkg" rel="ge" version="1.4">PEAR</dep>
index 283526756e2cb3334ed23bd9a417b97dbfb9c6e2..90dfb556f6c2eb0f0eaaff95ad91d34e32b1c361 100644 (file)
@@ -225,43 +225,43 @@ not pkg2 works? yes
 no error
 has pkg2 works? no
 $ret is PEAR_DEPENDENCY_MISSING? yes
-requires package `pkg2'
+requires package `pear::pkg2'
 has optional pkg2 works? no
 $ret is PEAR_DEPENDENCY_MISSING_OPTIONAL? yes
-package `pkg2' is recommended to utilize some features.
+package `pear::pkg2' is recommended to utilize some features.
 le 0.9 works? no
 $ret is PEAR_DEPENDENCY_CONFLICT? yes
-requires package `pkg1' <= 0.9
+requires package `pear::pkg1' <= 0.9
 optional le 0.9 works? no
 $ret is PEAR_DEPENDENCY_CONFLICT_OPTIONAL? yes
-package `pkg1' version <= 0.9 is recommended to utilize some features.  Installed version is 1.0
+package `pear::pkg1' version <= 0.9 is recommended to utilize some features.  Installed version is 1.0
 ne 1.0 works? no
 $ret is PEAR_DEPENDENCY_CONFLICT? yes
-requires package `pkg1' != 1.0
+requires package `pear::pkg1' != 1.0
 optional ne 1.0 works? no
 $ret is PEAR_DEPENDENCY_CONFLICT_OPTIONAL? yes
-package `pkg1' version != 1.0 is recommended to utilize some features.  Installed version is 1.0
+package `pear::pkg1' version != 1.0 is recommended to utilize some features.  Installed version is 1.0
 ge 1.1 works? no
 $ret is PEAR_DEPENDENCY_UPGRADE_MINOR? yes
-requires package `pkg1' >= 1.1
+requires package `pear::pkg1' >= 1.1
 optional ge 1.1 works? no
 $ret is PEAR_DEPENDENCY_UPGRADE_MINOR_OPTIONAL? yes
-package `pkg1' version >= 1.1 is recommended to utilize some features.  Installed version is 1.0
+package `pear::pkg1' version >= 1.1 is recommended to utilize some features.  Installed version is 1.0
 ge 2.0 works? no
 $ret is PEAR_DEPENDENCY_UPGRADE_MAJOR? yes
-requires package `pkg1' >= 2.0
+requires package `pear::pkg1' >= 2.0
 optional ge 2.0 works? no
 $ret is PEAR_DEPENDENCY_UPGRADE_MAJOR_OPTIONAL? yes
-package `pkg1' version >= 2.0 is recommended to utilize some features.  Installed version is 1.0
+package `pear::pkg1' version >= 2.0 is recommended to utilize some features.  Installed version is 1.0
 gt 1.0 works? no
 $ret is PEAR_DEPENDENCY_UPGRADE_MINOR? yes
-requires package `pkg1' > 1.0
+requires package `pear::pkg1' > 1.0
 optional gt 1.0 works? no
 $ret is PEAR_DEPENDENCY_UPGRADE_MINOR_OPTIONAL? yes
-package `pkg1' version > 1.0 is recommended to utilize some features.  Installed version is 1.0
+package `pear::pkg1' version > 1.0 is recommended to utilize some features.  Installed version is 1.0
 not pkg1 works? no
 $ret is PEAR_DEPENDENCY_CONFLICT? yes
-conflicts with package `pkg1'
+conflicts with package `pear::pkg1'
 foobar pkg1 works? no
 $ret is PEAR_DEPENDENCY_BAD_DEPENDENCY? yes
-relation 'foobar' with requirement '' is not supported (name=pkg1)
+relation 'foobar' with requirement '' is not supported (name=pear::pkg1)
index 445f5a37bf3f8f73815ebfc0f1bec24c18e8ee2e..593d38ad4502c0acdd0040550b38c39e56095ccd 100644 (file)
@@ -221,7 +221,7 @@ zoorb.php exists? yes
 goompness/Mopreeb.php exists? yes
 goompness/oggbrzitzkee.php exists? yes
 Test conflicting files:
-Caught error: pkg6conflict: conflicting files found:
+Caught error: pear::pkg6conflict: conflicting files found:
 groob\goompness\oggbrzitzkee.php (pkg6)
      groob\goompness\Mopreeb.php (pkg6)
 
index 4680f3f7098eab0d754006907c62c3f42c95b6fc..ab1811db33cbe7eab6874a934888aedc78ead838 100644 (file)
@@ -38,12 +38,17 @@ if (!is_dir($temp_path . DIRECTORY_SEPARATOR . 'bin')) {
 }
 // make the fake configuration - we'll use one of these and it should work
 $config = serialize(array('master_server' => 'pear.php.net',
+    'default_channel' => 'pear',
     'php_dir' => $temp_path . DIRECTORY_SEPARATOR . 'php',
     'ext_dir' => $temp_path . DIRECTORY_SEPARATOR . 'ext',
     'data_dir' => $temp_path . DIRECTORY_SEPARATOR . 'data',
     'doc_dir' => $temp_path . DIRECTORY_SEPARATOR . 'doc',
     'test_dir' => $temp_path . DIRECTORY_SEPARATOR . 'test',
-    'bin_dir' => $temp_path . DIRECTORY_SEPARATOR . 'bin',));
+    'bin_dir' => $temp_path . DIRECTORY_SEPARATOR . 'bin',
+    '__channels' => array(
+        'frob' => array(
+            'php_dir' => $temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob',
+    ))));
 touch($temp_path . DIRECTORY_SEPARATOR . 'pear.conf');
 $fp = fopen($temp_path . DIRECTORY_SEPARATOR . 'pear.conf', 'w');
 fwrite($fp, $config);
@@ -59,6 +64,16 @@ if (!empty($home)) {
     // for PEAR_Config initialization
     putenv('HOME="'.$temp_path);
 }
+require_once 'PEAR/ChannelFile.php';
+require_once 'PEAR/Registry.php';
+$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
+$chan = new PEAR_ChannelFile;
+$chan->setName('frob');
+$chan->setSummary('test');
+$chan->setServer('test');
+$reg->addChannel($chan);
+$chan->setName('groob');
+$reg->addChannel($chan);
 require_once "PEAR/Installer.php";
 
 // no UI is needed for these tests
@@ -84,106 +99,49 @@ function catchit($err)
 }
 
 echo "Test package.xml direct install:\n";
-$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'package.xml');
+$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'package2.xml');
 $reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
-var_dump($reg->listPackages());
+var_dump($reg->listAllPackages());
 echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
     . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
 echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
     . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
     . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
 echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
     . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
     . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
-echo "After uninstall:\n";
-$installer->uninstall('pkg6');
-var_dump($reg->listPackages());
-echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
-echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
-    . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
-echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
-    . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
-echo "goompness exists? ";
-echo (is_dir($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'))
-    ? "yes\n" : "no\n";
+echo "goompness/test.dat exists? ";
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'pkg6'
+    . DIRECTORY_SEPARATOR . 'goompness'
+    . DIRECTORY_SEPARATOR . 'test.dat')) ? "yes\n" : "no\n";
 
-echo "Test .tgz install:\n";
-$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'pkg6-1.1.tgz');
-$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
-var_dump($reg->listPackages());
-echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
-echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
-    . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
-echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
-    . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
-echo "After uninstall:\n";
-$installer->uninstall('pkg6');
-var_dump($reg->listPackages());
-echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
-echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
-    . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
-echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
-    . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
-echo "goompness exists? ";
-echo (is_dir($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'))
-    ? "yes\n" : "no\n";
+echo "Test conflicting files:\n";
+$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'conflictpackage2.xml');
 
-echo "Test invalid .tgz install:\n";
-$error_to_catch = 'unable to unpack ' . dirname(__FILE__) . DIRECTORY_SEPARATOR .
-    'test-pkg6' . DIRECTORY_SEPARATOR . 'invalidtgz.tgz';
-$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'invalidtgz.tgz');
-$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
-var_dump($reg->listPackages());
-echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
-echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
-    . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
-echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
-    . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
-    . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
+echo "Test unknown channel:\n";
+$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'package2_invalid.xml');
 
-echo "Test missing package.xml in .tgz install:\n";
-$installer->install(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'test-pkg6' . DIRECTORY_SEPARATOR . 'nopackagexml.tgz');
-$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
-var_dump($reg->listPackages());
+echo "After uninstall:\n";
+$installer->uninstall('frob::pkg6');
+var_dump($reg->listAllPackages());
 echo "zoorb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
     . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'zoorb.php')) ? "yes\n" : "no\n";
 echo "goompness/Mopreeb.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
     . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
     . DIRECTORY_SEPARATOR . 'Mopreeb.php')) ? "yes\n" : "no\n";
 echo "goompness/oggbrzitzkee.php exists? ";
-echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php'
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . 'frob'
     . DIRECTORY_SEPARATOR . 'groob' . DIRECTORY_SEPARATOR . 'goompness'
     . DIRECTORY_SEPARATOR . 'oggbrzitzkee.php')) ? "yes\n" : "no\n";
+echo "goompness/test.dat exists? ";
+echo (file_exists($temp_path . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'pkg6'
+    . DIRECTORY_SEPARATOR . 'goompness'
+    . DIRECTORY_SEPARATOR . 'test.dat')) ? "yes\n" : "no\n";
 
 chdir($curdir);
 cleanall($temp_path);
@@ -211,49 +169,45 @@ function cleanall($dir)
 --POST--
 --EXPECT--
 Test package.xml direct install:
-array(1) {
-  [0]=>
-  string(4) "pkg6"
-}
-zoorb.php exists? yes
-goompness/Mopreeb.php exists? yes
-goompness/oggbrzitzkee.php exists? yes
-After uninstall:
-array(0) {
-}
-zoorb.php exists? no
-goompness/Mopreeb.php exists? no
-goompness/oggbrzitzkee.php exists? no
-goompness exists? no
-Test .tgz install:
-array(1) {
-  [0]=>
-  string(4) "pkg6"
+array(3) {
+  ["frob"]=>
+  array(1) {
+    [0]=>
+    string(4) "pkg6"
+  }
+  ["groob"]=>
+  array(0) {
+  }
+  ["pear"]=>
+  array(0) {
+  }
 }
 zoorb.php exists? yes
 goompness/Mopreeb.php exists? yes
 goompness/oggbrzitzkee.php exists? yes
+goompness/test.dat exists? yes
+Test conflicting files:
+Caught error: groob::pkg6conflict: conflicting files found:
+groob\goompness\oggbrzitzkee.php (frob::pkg6)
+     groob\goompness\Mopreeb.php (frob::pkg6)
+        groob\goompness\test.dat (frob::pkg6)
+
+Test unknown channel:
+Error: Unknown channel, "gorp"
+Caught error: Installation failed: invalid package file, use option force to install anyway
 After uninstall:
-array(0) {
-}
-zoorb.php exists? no
-goompness/Mopreeb.php exists? no
-goompness/oggbrzitzkee.php exists? no
-goompness exists? no
-Test invalid .tgz install:
-Caught error: Invalid checksum for file "<?xml version="1.0" encoding="ISO-8859-1" ?>
-    <!DOCTYPE package SYSTEM "http://pear.php.net/dtd/" : 37649 calculated, 0 expected
-Caught expected error
-array(0) {
-}
-zoorb.php exists? no
-goompness/Mopreeb.php exists? no
-goompness/oggbrzitzkee.php exists? no
-Test missing package.xml in .tgz install:
-warning : you are using an archive with an old format
-Caught error: no package.xml file after extracting the archive
-array(0) {
+array(3) {
+  ["frob"]=>
+  array(0) {
+  }
+  ["groob"]=>
+  array(0) {
+  }
+  ["pear"]=>
+  array(0) {
+  }
 }
 zoorb.php exists? no
 goompness/Mopreeb.php exists? no
 goompness/oggbrzitzkee.php exists? no
+goompness/test.dat exists? no
index 40daec7b2a94436840261110793c2e81876aefd6..38787847180034dfb0db146071851f5e6c476508 100644 (file)
@@ -60,8 +60,10 @@ if (!empty($home)) {
     putenv('HOME="'.$temp_path);
 }
 require_once "PEAR/Packager.php";
-
+require_once 'PEAR/Registry.php';
+$reg = &new PEAR_Registry($temp_path . DIRECTORY_SEPARATOR . 'php');
 $packager = new PEAR_Packager();
+$packager->setRegistry($reg);
 $curdir = getcwd();
 chdir(dirname(__FILE__));
 
index 89313618a7a4b8586039c3e7147605042ca6708f..e3083cbb6a65caeb0ff4b61e473cbc6853f7279d 100644 (file)
@@ -78,10 +78,6 @@ dumpall($reg);
 var_dump($reg->deletePackage("pkg2"));
 dumpall($reg);
 
-echo "add package with conflicting files:\n";
-var_dump($reg->addPackage('pkg2', array('name' => 'pkg2', 'version' => '1.0', 'filelist' => $files1)));
-dumpall($reg);
-
 $reg->updatePackage("pkg3", array("version" => "3.1b1", "status" => "beta"));
 dumpall($reg);
 
@@ -130,16 +126,6 @@ channel pear:
 pkg1: version="1.0" filelist=array(pkg1-1.php[role=php],pkg1-2.php[role=php,baseinstalldir=pkg1])
 pkg3: version="3.0" filelist=array(pkg3-1.php[role=php],pkg3-2.php[role=php,baseinstalldir=pkg3])
 dump done
-add package with conflicting files:
-caught ErrorStack error:
-message: package pear::pkg2 has files that conflict with installed packages pear::pkg1
-code: -5
-bool(false)
-dumping registry...
-channel pear:
-pkg1: version="1.0" filelist=array(pkg1-1.php[role=php],pkg1-2.php[role=php,baseinstalldir=pkg1])
-pkg3: version="3.0" filelist=array(pkg3-1.php[role=php],pkg3-2.php[role=php,baseinstalldir=pkg3])
-dump done
 dumping registry...
 channel pear:
 pkg1: version="1.0" filelist=array(pkg1-1.php[role=php],pkg1-2.php[role=php,baseinstalldir=pkg1])