svn: /pear2/Pyrus/trunk/tests/ Channel/remote.phpt Mocks/Internet/remotechannel/channel.xml
| From: | Brett Bieber | Date: | Wed, 23 Dec 2009 16:18:39 +0000 |
| Subject: | svn: /pear2/Pyrus/trunk/tests/ Channel/remote.phpt Mocks/Internet/remotechannel/channel.xml | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-58351@lists.php.net to get a copy of this message | ||
saltybeagle Wed, 23 Dec 2009 16:18:39 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=292543
Log:
Use mock Internet driver to overcome the ssl_verify_peer problem as that's not what we're
testing here.
Changed paths:
U pear2/Pyrus/trunk/tests/Channel/remote.phpt
A pear2/Pyrus/trunk/tests/Mocks/Internet/remotechannel/
A pear2/Pyrus/trunk/tests/Mocks/Internet/remotechannel/channel.xml
Modified: pear2/Pyrus/trunk/tests/Channel/remote.phpt
===================================================================
--- pear2/Pyrus/trunk/tests/Channel/remote.phpt 2009-12-23 16:18:22 UTC (rev 292542)
+++ pear2/Pyrus/trunk/tests/Channel/remote.phpt 2009-12-23 16:18:39 UTC (rev 292543)
@@ -1,15 +1,13 @@
--TEST--
\pear2\Pyrus\Channel Remote channel retrieval
---SKIPIF--
-<?php
-$connection = @file_get_contents('http://pear.php.net/channel.xml');
-if (!$connection) {
- echo 'Must have Internet access to test remote channel info retrieval.';
-}
--FILE--
<?php
require dirname(__FILE__) . '/setup.php.inc';
+require __DIR__ . '/../Mocks/Internet.php';
+Internet::addDirectory(__DIR__ . '/../Mocks/Internet/remotechannel',
+ 'http://pear.php.net/');
+\pear2\Pyrus\Main::$downloadClass = 'Internet';
// From file_get_contents
$channel = new \pear2\Pyrus\ChannelFile('http://pear.php.net/channel.xml');
// $channel should be set up!
Added: pear2/Pyrus/trunk/tests/Mocks/Internet/remotechannel/channel.xml
===================================================================
--- pear2/Pyrus/trunk/tests/Mocks/Internet/remotechannel/channel.xml (rev 0)
+++ pear2/Pyrus/trunk/tests/Mocks/Internet/remotechannel/channel.xml 2009-12-23 16:18:39 UTC (rev
292543)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<channel version="1.0" xmlns="http://pear.php.net/channel-1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pear.php.net/channel-1.0
+http://pear.php.net/dtd/channel-1.0.xsd">
+ <name>pear.php.net</name>
+ <suggestedalias>pear</suggestedalias>
+ <summary>PHP Extension and Application Repository</summary>
+ <servers>
+ <primary>
+ <rest>
+
+ <baseurl type="REST1.0">http://pear.php.net/rest/</baseurl>
+ <baseurl type="REST1.1">http://pear.php.net/rest/</baseurl>
+ <baseurl type="REST1.2">http://pear.php.net/rest/</baseurl>
+ <baseurl type="REST1.3">http://pear.php.net/rest/</baseurl>
+ </rest>
+ </primary>
+ <mirror host="us.pear.php.net">
+
+ <rest>
+ <baseurl type="REST1.0">http://us.pear.php.net/rest/</baseurl>
+ <baseurl type="REST1.1">http://us.pear.php.net/rest/</baseurl>
+ <baseurl type="REST1.2">http://us.pear.php.net/rest/</baseurl>
+ <baseurl type="REST1.3">http://us.pear.php.net/rest/</baseurl>
+ </rest>
+ </mirror>
+
+ <mirror host="de.pear.php.net" ssl="yes" port="3452">
+ <rest>
+ <baseurl type="REST1.0">https://de.pear.php.net:3452/rest/</baseurl>
+ <baseurl type="REST1.1">https://de.pear.php.net:3452/rest/</baseurl>
+ <baseurl type="REST1.2">https://de.pear.php.net:3452/rest/</baseurl>
+ <baseurl type="REST1.3">https://de.pear.php.net:3452/rest/</baseurl>
+ </rest>
+
+ </mirror>
+ </servers>
+</channel>