本文整理匯總了PHP中dm::getVersionMinor方法的典型用法代碼示例。如果您正苦於以下問題:PHP dm::getVersionMinor方法的具體用法?PHP dm::getVersionMinor怎麽用?PHP dm::getVersionMinor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類dm
的用法示例。
在下文中一共展示了dm::getVersionMinor方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dirname
<?php
require_once dirname(__FILE__) . '/helper/dmUnitTestHelper.php';
$helper = new dmUnitTestHelper();
$helper->boot();
$t = new lime_test(12);
$t->comment('Weird version numbers will be shown during this test.');
$t->comment('Diem real version number is ' . DIEM_VERSION);
dm::setVersion('5.2.14');
$t->is(dm::getVersion(), '5.2.14', 'Diem version is 5.2.14');
$t->is(dm::getVersionMajor(), '5', 'Diem version major is 5');
$t->is(dm::getVersionMinor(), '2', 'Diem version minor is 2');
$t->is(dm::getVersionMaintenance(), '14', 'Diem version maintenance is 14');
$t->is(dm::getVersionBranch(), '5.2', 'Diem version branch is 5.2');
dm::setVersion('5.0.0-BETA4_DEV');
$t->is(dm::getVersion(), '5.0.0-BETA4_DEV', 'Diem version is 5.0.0-BETA4_DEV');
$t->is(dm::getVersionMajor(), '5', 'Diem version major is 5');
$t->is(dm::getVersionMinor(), '0', 'Diem version minor is 0');
$t->is(dm::getVersionMaintenance(), '0-BETA4_DEV', 'Diem version maintenance is 0-BETA4_DEV');
$t->is(dm::getVersionBranch(), '5.0', 'Diem version branch is 5.0');
dm::setVersion(DIEM_VERSION);
$t->is(version_compare('5.0.0-BETA4_DEV', '5.0.0'), -1, '5.0.0-BETA4_DEV < 5.0.0');
$t->is(version_compare('5.0.0', '5.0.1'), -1, '5.0.0 < 5.0.1');