svn: /pear2/Pyrus/trunk/tests/ RemoteCategories/exceptions.phpt

From: Date: Fri, 01 Jan 2010 14:03:35 +0000
Subject: svn: /pear2/Pyrus/trunk/tests/ RemoteCategories/exceptions.phpt
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-9161@lists.php.net to get a copy of this message
saltybeagle Fri, 01 Jan 2010 14:03:35 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=292879 Log: Finish renaming classes Changed paths: A + pear2/Pyrus/trunk/tests/RemoteCategories/ (from pear2/Pyrus/trunk/tests/Remotecategories/:r292871) D pear2/Pyrus/trunk/tests/RemoteCategories/exceptions.phpt A + pear2/Pyrus/trunk/tests/RemoteCategories/exceptions.phpt (from pear2/Pyrus/trunk/tests/Remotecategories/exceptions.phpt:r292873) A + pear2/Pyrus/trunk/tests/RemoteCategory/ (from pear2/Pyrus/trunk/tests/Remotecategory/:r292871) A + pear2/Pyrus/trunk/tests/RemotePackages/ (from pear2/Pyrus/trunk/tests/Remotepackages/:r292871) D pear2/Pyrus/trunk/tests/Remotecategories/ D pear2/Pyrus/trunk/tests/Remotecategory/ D pear2/Pyrus/trunk/tests/Remotepackages/ Property changes on: pear2/Pyrus/trunk/tests/RemoteCategories ___________________________________________________________________ Added: svn:ignore + *.php *.out *.exp *.log *.xdebug Added: svn:mergeinfo + Deleted: pear2/Pyrus/trunk/tests/RemoteCategories/exceptions.phpt =================================================================== --- pear2/Pyrus/trunk/tests/Remotecategories/exceptions.phpt 2009-12-31 22:17:25 UTC (rev 292871) +++ pear2/Pyrus/trunk/tests/RemoteCategories/exceptions.phpt 2010-01-01 14:03:35 UTC (rev 292879) @@ -1,45 +0,0 @@ ---TEST-- -\pear2\Pyrus\Channel\Remotecategories: Exceptions ---FILE-- -<?php - -define('MYDIR', __DIR__); -include __DIR__ . '/setup.php.inc'; -require __DIR__ . '/../Mocks/Internet.php'; - -Internet::addDirectory(__DIR__ . '/../Mocks/Internet/remotepackage', - 'http://pear2.php.net/'); -\pear2\Pyrus\Main::$downloadClass = 'Internet'; -$chan = \pear2\Pyrus\Config::current()->channelregistry['pecl.php.net']; -unset($chan->protocols->rest['REST1.1']); -try { - $remote = new pear2\Pyrus\Channel\Remotecategories($chan); - throw new Exception('succeeded and should fail'); -} catch (\pear2\Pyrus\Channel\Exception $e) { - $test->assertEquals('Cannot access remote categories without REST1.1 protocol', $e->getMessage(), - 'no REST1.1'); -} -$remote = new pear2\Pyrus\Channel\Remotecategories(\pear2\Pyrus\Config::current()->channelregistry['pear2.php.net']); -try { - $remote['foo'] = 1; - throw new Exception('succeeded and should fail'); -} catch (\pear2\Pyrus\Channel\Exception $e) { - $test->assertEquals('remote channel info is read-only', $e->getMessage(), - 'offsetSet'); -} -try { - unset($remote['foo']); - throw new Exception('succeeded and should fail'); -} catch (\pear2\Pyrus\Channel\Exception $e) { - $test->assertEquals('remote channel info is read-only', $e->getMessage(), - 'offsetUnset'); -} -?> -===DONE=== ---CLEAN-- -<?php -$dir = __DIR__ . '/testit'; -include __DIR__ . '/../clean.php.inc'; -?> ---EXPECT-- -===DONE=== \ No newline at end of file Copied: pear2/Pyrus/trunk/tests/RemoteCategories/exceptions.phpt (from rev 292873, pear2/Pyrus/trunk/tests/Remotecategories/exceptions.phpt) =================================================================== --- pear2/Pyrus/trunk/tests/RemoteCategories/exceptions.phpt (rev 0) +++ pear2/Pyrus/trunk/tests/RemoteCategories/exceptions.phpt 2010-01-01 14:03:35 UTC (rev 292879) @@ -0,0 +1,45 @@ +--TEST-- +\pear2\Pyrus\Channel\Remotecategories: Exceptions +--FILE-- +<?php + +define('MYDIR', __DIR__); +include __DIR__ . '/setup.php.inc'; +require __DIR__ . '/../Mocks/Internet.php'; + +Internet::addDirectory(__DIR__ . '/../Mocks/Internet/remotepackage', + 'http://pear2.php.net/'); +\pear2\Pyrus\Main::$downloadClass = 'Internet'; +$chan = \pear2\Pyrus\Config::current()->channelregistry['pecl.php.net']; +unset($chan->protocols->rest['REST1.1']); +try { + $remote = new pear2\Pyrus\Channel\RemoteCategories($chan); + throw new Exception('succeeded and should fail'); +} catch (\pear2\Pyrus\Channel\Exception $e) { + $test->assertEquals('Cannot access remote categories without REST1.1 protocol', $e->getMessage(), + 'no REST1.1'); +} +$remote = new pear2\Pyrus\Channel\RemoteCategories(\pear2\Pyrus\Config::current()->channelregistry['pear2.php.net']); +try { + $remote['foo'] = 1; + throw new Exception('succeeded and should fail'); +} catch (\pear2\Pyrus\Channel\Exception $e) { + $test->assertEquals('remote channel info is read-only', $e->getMessage(), + 'offsetSet'); +} +try { + unset($remote['foo']); + throw new Exception('succeeded and should fail'); +} catch (\pear2\Pyrus\Channel\Exception $e) { + $test->assertEquals('remote channel info is read-only', $e->getMessage(), + 'offsetUnset'); +} +?> +===DONE=== +--CLEAN-- +<?php +$dir = __DIR__ . '/testit'; +include __DIR__ . '/../clean.php.inc'; +?> +--EXPECT-- +===DONE=== Property changes on: pear2/Pyrus/trunk/tests/RemoteCategory ___________________________________________________________________ Added: svn:ignore + *.php *.out *.exp *.log *.xdebug Added: svn:mergeinfo + Property changes on: pear2/Pyrus/trunk/tests/RemotePackages ___________________________________________________________________ Added: svn:ignore + *.php *.out *.exp *.log *.xdebug Added: svn:mergeinfo +

« previous php.pear.core (#9161) next »