cvs: pear-core /tests/PEAR_PackageFile/v2 test_addConflictingPackageDepWithChannel.phpt test_addConflictingPackageDepWithURI.phpt
| From: | Greg Beaver | Date: | Thu, 04 Nov 2004 23:21:11 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_PackageFile/v2 test_addConflictingPackageDepWithChannel.phpt test_addConflictingPackageDepWithURI.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-25685@lists.php.net to get a copy of this message | ||
cellog Thu Nov 4 18:21:11 2004 EDT
Modified files:
/pear-core/tests/PEAR_PackageFile/v2
test_addConflictingPackageDepWithChannel.phpt
test_addConflictingPackageDepWithURI.phpt
Log:
add test for addConflictingPackageDepWith*()
multiple dependencies
http://cvs.php.net/diff.php/pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithChannel.phpt?r1=1.1&r2=1.2&ty=u
Index: pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithChannel.phpt
diff -u pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithChannel.phpt:1.1
pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithChannel.phpt:1.2
--- pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithChannel.phpt:1.1 Thu Nov 4
18:05:52 2004
+++ pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithChannel.phpt Thu Nov 4
18:21:11 2004
@@ -52,6 +52,35 @@
),
), $pf->getDeps(true), 'clear failed');
+$pf->addConflictingPackageDepWithChannel('fakeo', 'gronko2');
+$phpunit->assertEquals(array (
+ 'required' =>
+ array (
+ 'php' =>
+ array (
+ 'min' => '4.3.6',
+ 'max' => '6.0.0',
+ ),
+ 'pearinstaller' =>
+ array (
+ 'min' => '1.4.0a1',
+ ),
+ 'package' =>
+ array (
+ array(
+ 'name' => 'fakeo',
+ 'channel' => 'gronko',
+ 'conflicts' => 'yes',
+ ),
+ array(
+ 'name' => 'fakeo',
+ 'channel' => 'gronko2',
+ 'conflicts' => 'yes',
+ ),
+ ),
+ ),
+), $pf->getDeps(true), 'clear failed');
+
$result = $pf->validate(PEAR_VALIDATE_NORMAL);
$phpunit->assertEquals(array(), $fakelog->getLog(), 'normal validate empty log');
$phpunit->assertNoErrors('after validation');
http://cvs.php.net/diff.php/pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithURI.phpt?r1=1.1&r2=1.2&ty=u
Index: pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithURI.phpt
diff -u pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithURI.phpt:1.1
pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithURI.phpt:1.2
--- pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithURI.phpt:1.1 Thu Nov 4
18:05:52 2004
+++ pear-core/tests/PEAR_PackageFile/v2/test_addConflictingPackageDepWithURI.phpt Thu Nov 4
18:21:11 2004
@@ -52,6 +52,35 @@
),
), $pf->getDeps(true), 'clear failed');
+$pf->addConflictingPackageDepWithURI('fakeo2', 'http://www.foozample.com/fakeo.tgz');
+$phpunit->assertEquals(array (
+ 'required' =>
+ array (
+ 'php' =>
+ array (
+ 'min' => '4.3.6',
+ 'max' => '6.0.0',
+ ),
+ 'pearinstaller' =>
+ array (
+ 'min' => '1.4.0a1',
+ ),
+ 'package' =>
+ array (
+ array (
+ 'name' => 'fakeo',
+ 'uri' => 'http://www.example.com/package.tgz',
+ 'conflicts' => 'yes',
+ ),
+ array (
+ 'name' => 'fakeo2',
+ 'uri' => 'http://www.foozample.com/fakeo.tgz',
+ 'conflicts' => 'yes',
+ ),
+ ),
+ ),
+), $pf->getDeps(true), 'clear failed');
+
$result = $pf->validate(PEAR_VALIDATE_NORMAL);
$phpunit->assertEquals(array(), $fakelog->getLog(), 'normal validate empty log');
$phpunit->assertNoErrors('after validation');