cvs: pear-core /tests/PEAR_Dependency2 test_checkPackageDependency_PEAR_exclude.phpt

From: Date: Thu, 21 Oct 2004 15:22:32 +0000
Subject: cvs: pear-core /tests/PEAR_Dependency2 test_checkPackageDependency_PEAR_exclude.phpt
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-1096@lists.php.net to get a copy of this message
cellog Thu Oct 21 11:22:32 2004 EDT Modified files: /pear-core/tests/PEAR_Dependency2 test_checkPackageDependency_PEAR_exclude.phpt Log: make sure that an array of excludes also works http://cvs.php.net/diff.php/pear-core/tests/PEAR_Dependency2/test_checkPackageDependency_PEAR_exclude.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Dependency2/test_checkPackageDependency_PEAR_exclude.phpt diff -u pear-core/tests/PEAR_Dependency2/test_checkPackageDependency_PEAR_exclude.phpt:1.2 pear-core/tests/PEAR_Dependency2/test_checkPackageDependency_PEAR_exclude.phpt:1.3 --- pear-core/tests/PEAR_Dependency2/test_checkPackageDependency_PEAR_exclude.phpt:1.2 Thu Oct 21 11:21:33 2004 +++ pear-core/tests/PEAR_Dependency2/test_checkPackageDependency_PEAR_exclude.phpt Thu Oct 21 11:22:32 2004 @@ -43,6 +43,21 @@ $phpunit->assertEquals(array(), $fakelog->getLog(), 'exclude 1 log'); $phpunit->assertIsa('PEAR_Error', $result, 'exclude 1'); +$result = $dep->validatePackageDependency( + array( + 'name' => 'foo', + 'channel' => 'pear.php.net', + 'min' => '0.9', + 'max' => '1.9', + 'exclude' => array('0.9','1.0'), + ), true, array()); +$phpunit->assertErrors(array( + array('package' => 'PEAR_Error', + 'message' => 'channel://pear.php.net/mine is not compatible with installed package "channel://pear.php.net/foo" version 1.0') +), 'exclude 1 multi'); +$phpunit->assertEquals(array(), $fakelog->getLog(), 'exclude 1 log multi'); +$phpunit->assertIsa('PEAR_Error', $result, 'exclude 1 multi'); + // nodeps $dep = &new test_PEAR_Dependency2($config, array('nodeps' => true), array('channel' => 'pear.php.net', 'package' => 'mine'), PEAR_VALIDATE_INSTALLING);

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