cvs: pear-core /tests/PEAR_Validate test_validVersion.phpt
| From: | Greg Beaver | Date: | Wed, 03 Nov 2004 23:04:44 +0000 |
| Subject: | cvs: pear-core /tests/PEAR_Validate test_validVersion.phpt | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-1225@lists.php.net to get a copy of this message | ||
cellog Wed Nov 3 18:04:44 2004 EDT
Added files:
/pear-core/tests/PEAR_Validate test_validVersion.phpt
Log:
test for validVersion
http://cvs.php.net/co.php/pear-core/tests/PEAR_Validate/test_validVersion.phpt?r=1.1&p=1
Index: pear-core/tests/PEAR_Validate/test_validVersion.phpt
+++ pear-core/tests/PEAR_Validate/test_validVersion.phpt
--TEST--
PEAR_Validate::validVersion()
--SKIPIF--
<?php
if (!getenv('PHP_PEAR_RUNTESTS')) {
echo 'skip';
}
?>
--FILE--
<?php
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'setup.php.inc';
$res = PEAR_Validate::validVersion('1');
$phpunit->assertTrue($res, '1');
$res = PEAR_Validate::validVersion('1.0');
$phpunit->assertTrue($res, '1.0');
$res = PEAR_Validate::validVersion('1.0.0');
$phpunit->assertTrue($res, '1.0.0');
$res = PEAR_Validate::validVersion('1RC1');
$phpunit->assertTrue($res, '1RC1');
$res = PEAR_Validate::validVersion('1.0RC1');
$phpunit->assertTrue($res, '1.0RC1');
$res = PEAR_Validate::validVersion('1.0.234RC1');
$phpunit->assertTrue($res, '1.0.234RC1');
$res = PEAR_Validate::validVersion('1.0a1');
$phpunit->assertTrue($res, '1.0a1');
$res = PEAR_Validate::validVersion('1.0a');
$phpunit->assertTrue($res, '1.0a');
$res = PEAR_Validate::validVersion('1231.0a');
$phpunit->assertTrue($res, '1231.0a');
echo 'tests done';
?>
--EXPECT--
tests done