cvs: pear-core /tests/PEAR_Validate test_validate_version_devel.phpt test_validate_versionbasic.phpt test_validate_versionbasic_alpha.phpt
test_validate_versionbasic_beta.phpt test_validate_versionbasic_stable.phpt test_validate_versionextends_alpha.phpt
test_validate_versionextends_beta.phpt test_validate_versionextends_stable.phpt
| From: | Greg Beaver | Date: | Tue, 22 Feb 2005 05:18:19 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Validate test_validate_version_devel.phpt test_validate_versionbasic.phpt test_validate_versionbasic_alpha.phpt test_validate_versionbasic_beta.phpt test_validate_versionbasic_stable.phpt test_validate_versionextends_alpha.phpt test_validate_versionextends_beta.phpt test_validate_versionextends_stable.phpt |
||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-29650@lists.php.net to get a copy of this message | ||
cellog Tue Feb 22 00:18:19 2005 EDT
Modified files:
/pear-core/tests/PEAR_Validate test_validate_version_devel.phpt
test_validate_versionbasic.phpt
test_validate_versionbasic_alpha.phpt
test_validate_versionbasic_beta.phpt
test_validate_versionbasic_stable.phpt
test_validate_versionextends_alpha.phpt
test_validate_versionextends_beta.phpt
test_validate_versionextends_stable.phpt
Log:
update tests to reflect kinder, gentler version validation
http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt Tue Feb 22 00:18:18 2005 @@ -327,7 +327,6 @@ $pf->setReleaseStability('devel'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.0.4 devel'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -345,27 +344,25 @@ $pf->setReleaseVersion('000.4.3'); $pf->setReleaseStability('devel'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.4.3 devel'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.4.3 devel'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.4.3" should be "0.4.3"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.4.3 devel'); $pf->setReleaseVersion('0.4.5'); $pf->setReleaseStability('devel'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.4.5 devel'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt?r1=1.3&r2=1.4&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt:1.3 pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt:1.4 --- pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt:1.3 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt Tue Feb 22 00:18:18 2005 @@ -326,7 +326,6 @@ $pf->setReleaseVersion('1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1 generic'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -344,7 +343,6 @@ $pf->setReleaseVersion('1.2.3.4.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.2.3.4.5 generic'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt Tue Feb 22 00:18:18 2005 @@ -327,7 +327,6 @@ $pf->setReleaseVersion('1.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 1.4.0a1 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -340,7 +339,6 @@ $pf->setReleaseVersion('0.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.2.5 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -352,86 +350,78 @@ $pf->setReleaseVersion('1.4.2a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.2a1 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.2a1 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'bugfix versions (1.3.x where x > 0) cannot be alpha or beta', + 'reason' => 'bugfix versions (1.3.x where x > 0) probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.2a1 alpha'); $pf->setReleaseVersion('1.4.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.0 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.0 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 1.4.0 cannot be alpha or beta', + 'reason' => 'version 1.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.0 alpha'); $pf->setReleaseVersion('1.4.00000'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.00000 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.00000 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 1.4.0 cannot be alpha or beta', + 'reason' => 'version 1.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.00000 alpha'); $pf->setReleaseVersion('000.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.2.5 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.2.5 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.2.5" should be "0.2.5"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.2.5 alpha'); $pf->setReleaseVersion('2.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.5.0 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.5.0 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', @@ -439,6 +429,9 @@ 'without an <extends> tag or an identical postfix (foo2 v2.0.0)', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.5.0 alpha'); echo 'tests done'; ?> http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt Tue Feb 22 00:18:18 2005 @@ -327,7 +327,6 @@ $pf->setReleaseVersion('1.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 1.4.0a1 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -340,7 +339,6 @@ $pf->setReleaseVersion('0.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.2.5 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -352,86 +350,78 @@ $pf->setReleaseVersion('1.4.2a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.2a1 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.2a1 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'bugfix versions (1.3.x where x > 0) cannot be alpha or beta', + 'reason' => 'bugfix versions (1.3.x where x > 0) probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.2a1 beta'); $pf->setReleaseVersion('1.4.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.0 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.0 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 1.4.0 cannot be alpha or beta', + 'reason' => 'version 1.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.0 beta'); $pf->setReleaseVersion('1.4.00000'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.00000 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.00000 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 1.4.0 cannot be alpha or beta', + 'reason' => 'version 1.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.00000 beta'); $pf->setReleaseVersion('000.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.2.5 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.2.5 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.2.5" should be "0.2.5"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.2.5 beta'); $pf->setReleaseVersion('2.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.5.0 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.5.0 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', @@ -439,6 +429,9 @@ 'without an <extends> tag or an identical postfix (foo2 v2.0.0)', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.5.0 beta'); echo 'tests done'; ?> http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt Tue Feb 22 00:18:18 2005 @@ -326,50 +326,44 @@ $pf->setReleaseStability('stable'); $pf->setReleaseVersion('1.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.0a1 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.0a1 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "1.4.0a1" or any RC/beta/alpha version cannot be stable', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.0a1 stable'); $pf->setReleaseVersion('0.4.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 0.4.5 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 0.4.5 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'versions less than 1.0.0 cannot be stable', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 0.4.5 stable'); $pf->setReleaseVersion('2.0.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.0.0 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.0.0 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', @@ -377,13 +371,15 @@ '1 for any package that does not have an <extends> tag', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.0.0 stable'); $pf->setReleaseVersion('1.0.0'); $pf->setReleaseStability('stable'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 1.0.0 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -397,7 +393,6 @@ $pf->setReleaseStability('stable'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 1.0.0pl1 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt Tue Feb 22 00:18:18 2005 @@ -329,7 +329,6 @@ $pf->setReleaseVersion('2.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 2.4.0a1 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -342,7 +341,6 @@ $pf->setReleaseVersion('0.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.2.5 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -354,83 +352,83 @@ $pf->setReleaseVersion('2.4.2a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.2a1 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.2a1 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'bugfix versions (2.x.y where y > 0) cannot be alpha or beta', + 'reason' => 'bugfix versions (2.x.y where y > 0) should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.2a1 alpha'); $pf->setReleaseVersion('2.4.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.0 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.0 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 2.4.0 cannot be alpha or beta', + 'reason' => 'version 2.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.0 alpha'); $pf->setReleaseVersion('2.4.00000'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.00000 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.00000 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 2.4.0 cannot be alpha or beta', + 'reason' => 'version 2.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.00000 alpha'); $pf->setReleaseVersion('000.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.2.5 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.2.5 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.2.5" should be "0.2.5"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.2.5 alpha'); $pf->setReleaseVersion('1.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.5.0 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -439,11 +437,6 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR1"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 1.5.0 alpha'); @@ -451,10 +444,14 @@ $pf->setReleaseVersion('10.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 10.5.0 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "10" must match the postfix of package name "PEAR9" (9)', + ), ), 'errors' => array ( @@ -463,11 +460,6 @@ 'field' => 'package', 'reason' => 'package PEAR9 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR10"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "10" must match the postfix of package name "PEAR9" (9)', - ), ), ), $val->getFailures(), 'failures attempt 10.5.0 alpha'); echo 'tests done'; http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt Tue Feb 22 00:18:18 2005 @@ -329,7 +329,6 @@ $pf->setReleaseVersion('2.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 2.4.0a1 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -342,7 +341,6 @@ $pf->setReleaseVersion('0.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.2.5 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -354,83 +352,83 @@ $pf->setReleaseVersion('2.4.2a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.2a1 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.2a1 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'bugfix versions (2.x.y where y > 0) cannot be alpha or beta', + 'reason' => 'bugfix versions (2.x.y where y > 0) should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.2a1 beta'); $pf->setReleaseVersion('2.4.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.0 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.0 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 2.4.0 cannot be alpha or beta', + 'reason' => 'version 2.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.0 beta'); $pf->setReleaseVersion('2.4.00000'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.00000 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.00000 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 2.4.0 cannot be alpha or beta', + 'reason' => 'version 2.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.00000 beta'); $pf->setReleaseVersion('000.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.2.5 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.2.5 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.2.5" should be "0.2.5"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.2.5 beta'); $pf->setReleaseVersion('1.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.5.0 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -439,11 +437,6 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR1"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 1.5.0 beta'); @@ -451,10 +444,14 @@ $pf->setReleaseVersion('10.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 10.5.0 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "10" must match the postfix of package name "PEAR9" (9)', + ), ), 'errors' => array ( @@ -463,11 +460,6 @@ 'field' => 'package', 'reason' => 'package PEAR9 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR10"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "10" must match the postfix of package name "PEAR9" (9)', - ), ), ), $val->getFailures(), 'failures attempt 10.5.0 beta'); echo 'tests done'; http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt?r1=1.3&r2=1.4&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt:1.3 pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt:1.4 --- pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt:1.3 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt Tue Feb 22 00:18:18 2005 @@ -328,47 +328,49 @@ $pf->setPackage('PEAR2'); $pf->setReleaseVersion('2.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.0a1 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.0a1 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "2.4.0a1" or any RC/beta/alpha version cannot be stable', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.0a1 stable'); $pf->setReleaseVersion('0.4.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 0.4.5 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 0.4.5 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'versions less than 1.0.0 cannot be stable', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 0.4.5 stable'); $pf->setReleaseVersion('3.0.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 3.0.0 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "3" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -377,21 +379,20 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR3"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "3" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 3.0.0 stable'); $pf->setReleaseVersion('30.0.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 30.0.0 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "30" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -400,11 +401,6 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR30"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "30" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 30.0.0 stable'); @@ -412,10 +408,14 @@ $pf->setReleaseStability('stable'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.0.0 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -424,11 +424,6 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR1"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 1.0.0 stable'); @@ -436,7 +431,6 @@ $pf->setReleaseStability('stable'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 2.0.0pl1 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -450,7 +444,6 @@ $pf->setReleaseVersion('30.3.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 30.3.5 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array (
http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_version_devel.phpt Tue Feb 22 00:18:18 2005 @@ -327,7 +327,6 @@ $pf->setReleaseStability('devel'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.0.4 devel'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -345,27 +344,25 @@ $pf->setReleaseVersion('000.4.3'); $pf->setReleaseStability('devel'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.4.3 devel'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.4.3 devel'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.4.3" should be "0.4.3"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.4.3 devel'); $pf->setReleaseVersion('0.4.5'); $pf->setReleaseStability('devel'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.4.5 devel'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt?r1=1.3&r2=1.4&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt:1.3 pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt:1.4 --- pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt:1.3 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionbasic.phpt Tue Feb 22 00:18:18 2005 @@ -326,7 +326,6 @@ $pf->setReleaseVersion('1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1 generic'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -344,7 +343,6 @@ $pf->setReleaseVersion('1.2.3.4.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.2.3.4.5 generic'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionbasic_alpha.phpt Tue Feb 22 00:18:18 2005 @@ -327,7 +327,6 @@ $pf->setReleaseVersion('1.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 1.4.0a1 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -340,7 +339,6 @@ $pf->setReleaseVersion('0.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.2.5 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -352,86 +350,78 @@ $pf->setReleaseVersion('1.4.2a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.2a1 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.2a1 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'bugfix versions (1.3.x where x > 0) cannot be alpha or beta', + 'reason' => 'bugfix versions (1.3.x where x > 0) probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.2a1 alpha'); $pf->setReleaseVersion('1.4.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.0 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.0 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 1.4.0 cannot be alpha or beta', + 'reason' => 'version 1.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.0 alpha'); $pf->setReleaseVersion('1.4.00000'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.00000 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.00000 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 1.4.0 cannot be alpha or beta', + 'reason' => 'version 1.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.00000 alpha'); $pf->setReleaseVersion('000.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.2.5 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.2.5 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.2.5" should be "0.2.5"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.2.5 alpha'); $pf->setReleaseVersion('2.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.5.0 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.5.0 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', @@ -439,6 +429,9 @@ 'without an <extends> tag or an identical postfix (foo2 v2.0.0)', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.5.0 alpha'); echo 'tests done'; ?> http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionbasic_beta.phpt Tue Feb 22 00:18:18 2005 @@ -327,7 +327,6 @@ $pf->setReleaseVersion('1.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 1.4.0a1 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -340,7 +339,6 @@ $pf->setReleaseVersion('0.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.2.5 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -352,86 +350,78 @@ $pf->setReleaseVersion('1.4.2a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.2a1 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.2a1 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'bugfix versions (1.3.x where x > 0) cannot be alpha or beta', + 'reason' => 'bugfix versions (1.3.x where x > 0) probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.2a1 beta'); $pf->setReleaseVersion('1.4.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.0 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.0 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 1.4.0 cannot be alpha or beta', + 'reason' => 'version 1.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.0 beta'); $pf->setReleaseVersion('1.4.00000'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.00000 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.00000 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 1.4.0 cannot be alpha or beta', + 'reason' => 'version 1.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.00000 beta'); $pf->setReleaseVersion('000.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.2.5 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.2.5 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.2.5" should be "0.2.5"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.2.5 beta'); $pf->setReleaseVersion('2.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.5.0 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.5.0 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', @@ -439,6 +429,9 @@ 'without an <extends> tag or an identical postfix (foo2 v2.0.0)', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.5.0 beta'); echo 'tests done'; ?> http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionbasic_stable.phpt Tue Feb 22 00:18:18 2005 @@ -326,50 +326,44 @@ $pf->setReleaseStability('stable'); $pf->setReleaseVersion('1.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 1.4.0a1 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 1.4.0a1 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "1.4.0a1" or any RC/beta/alpha version cannot be stable', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 1.4.0a1 stable'); $pf->setReleaseVersion('0.4.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 0.4.5 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 0.4.5 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'versions less than 1.0.0 cannot be stable', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 0.4.5 stable'); $pf->setReleaseVersion('2.0.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.0.0 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.0.0 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', @@ -377,13 +371,15 @@ '1 for any package that does not have an <extends> tag', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.0.0 stable'); $pf->setReleaseVersion('1.0.0'); $pf->setReleaseStability('stable'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 1.0.0 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -397,7 +393,6 @@ $pf->setReleaseStability('stable'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 1.0.0pl1 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionextends_alpha.phpt Tue Feb 22 00:18:18 2005 @@ -329,7 +329,6 @@ $pf->setReleaseVersion('2.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 2.4.0a1 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -342,7 +341,6 @@ $pf->setReleaseVersion('0.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.2.5 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -354,83 +352,83 @@ $pf->setReleaseVersion('2.4.2a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.2a1 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.2a1 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'bugfix versions (2.x.y where y > 0) cannot be alpha or beta', + 'reason' => 'bugfix versions (2.x.y where y > 0) should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.2a1 alpha'); $pf->setReleaseVersion('2.4.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.0 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.0 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 2.4.0 cannot be alpha or beta', + 'reason' => 'version 2.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.0 alpha'); $pf->setReleaseVersion('2.4.00000'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.00000 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.00000 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 2.4.0 cannot be alpha or beta', + 'reason' => 'version 2.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.00000 alpha'); $pf->setReleaseVersion('000.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.2.5 alpha'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.2.5 alpha'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.2.5" should be "0.2.5"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.2.5 alpha'); $pf->setReleaseVersion('1.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.5.0 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -439,11 +437,6 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR1"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 1.5.0 alpha'); @@ -451,10 +444,14 @@ $pf->setReleaseVersion('10.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 10.5.0 alpha'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "10" must match the postfix of package name "PEAR9" (9)', + ), ), 'errors' => array ( @@ -463,11 +460,6 @@ 'field' => 'package', 'reason' => 'package PEAR9 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR10"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "10" must match the postfix of package name "PEAR9" (9)', - ), ), ), $val->getFailures(), 'failures attempt 10.5.0 alpha'); echo 'tests done'; http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt?r1=1.2&r2=1.3&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt:1.2 pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt:1.3 --- pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt:1.2 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionextends_beta.phpt Tue Feb 22 00:18:18 2005 @@ -329,7 +329,6 @@ $pf->setReleaseVersion('2.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 2.4.0a1 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -342,7 +341,6 @@ $pf->setReleaseVersion('0.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 0.2.5 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -354,83 +352,83 @@ $pf->setReleaseVersion('2.4.2a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.2a1 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.2a1 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'bugfix versions (2.x.y where y > 0) cannot be alpha or beta', + 'reason' => 'bugfix versions (2.x.y where y > 0) should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.2a1 beta'); $pf->setReleaseVersion('2.4.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.0 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.0 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 2.4.0 cannot be alpha or beta', + 'reason' => 'version 2.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.0 beta'); $pf->setReleaseVersion('2.4.00000'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.00000 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.00000 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', - 'reason' => 'version 2.4.0 cannot be alpha or beta', + 'reason' => 'version 2.4.0 probably should not be alpha or beta', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.00000 beta'); $pf->setReleaseVersion('000.2.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 000.2.5 beta'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 000.2.5 beta'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "000.2.5" should be "0.2.5"', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 000.2.5 beta'); $pf->setReleaseVersion('1.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.5.0 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -439,11 +437,6 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR1"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 1.5.0 beta'); @@ -451,10 +444,14 @@ $pf->setReleaseVersion('10.5.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 10.5.0 beta'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "10" must match the postfix of package name "PEAR9" (9)', + ), ), 'errors' => array ( @@ -463,11 +460,6 @@ 'field' => 'package', 'reason' => 'package PEAR9 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR10"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "10" must match the postfix of package name "PEAR9" (9)', - ), ), ), $val->getFailures(), 'failures attempt 10.5.0 beta'); echo 'tests done'; http://cvs.php.net/diff.php/pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt?r1=1.3&r2=1.4&ty=u Index: pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt diff -u pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt:1.3 pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt:1.4 --- pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt:1.3 Mon Dec 6 11:33:12 2004 +++ pear-core/tests/PEAR_Validate/test_validate_versionextends_stable.phpt Tue Feb 22 00:18:18 2005 @@ -328,47 +328,49 @@ $pf->setPackage('PEAR2'); $pf->setReleaseVersion('2.4.0a1'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 2.4.0a1 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 2.4.0a1 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'version "2.4.0a1" or any RC/beta/alpha version cannot be stable', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 2.4.0a1 stable'); $pf->setReleaseVersion('0.4.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); -$phpunit->assertFalse($res, 'attempt 0.4.5 stable'); -$phpunit->showall(); +$phpunit->assertTrue($res, 'attempt 0.4.5 stable'); $phpunit->assertEquals(array ( 'warnings' => array ( - ), - 'errors' => - array ( 0 => array ( 'field' => 'version', 'reason' => 'versions less than 1.0.0 cannot be stable', ), ), + 'errors' => + array ( + ), ), $val->getFailures(), 'failures attempt 0.4.5 stable'); $pf->setReleaseVersion('3.0.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 3.0.0 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "3" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -377,21 +379,20 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR3"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "3" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 3.0.0 stable'); $pf->setReleaseVersion('30.0.0'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 30.0.0 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "30" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -400,11 +401,6 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR30"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "30" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 30.0.0 stable'); @@ -412,10 +408,14 @@ $pf->setReleaseStability('stable'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertFalse($res, 'attempt 1.0.0 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( + 0 => + array ( + 'field' => 'version', + 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', + ), ), 'errors' => array ( @@ -424,11 +424,6 @@ 'field' => 'package', 'reason' => 'package PEAR2 extends package PEAR and so the name must have a postfix equal to the major version like "PEAR1"', ), - 1 => - array ( - 'field' => 'version', - 'reason' => 'first version number "1" must match the postfix of package name "PEAR2" (2)', - ), ), ), $val->getFailures(), 'failures attempt 1.0.0 stable'); @@ -436,7 +431,6 @@ $pf->setReleaseStability('stable'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 2.0.0pl1 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array ( @@ -450,7 +444,6 @@ $pf->setReleaseVersion('30.3.5'); $res = $val->validate(PEAR_VALIDATE_PACKAGING); $phpunit->assertTrue($res, 'attempt 30.3.5 stable'); -$phpunit->showall(); $phpunit->assertEquals(array ( 'warnings' => array (