本文整理汇总了PHP中dm::getVersionMaintenance方法的典型用法代码示例。如果您正苦于以下问题:PHP dm::getVersionMaintenance方法的具体用法?PHP dm::getVersionMaintenance怎么用?PHP dm::getVersionMaintenance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dm
的用法示例。
在下文中一共展示了dm::getVersionMaintenance方法的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');