本文整理汇总了PHP中MDB2::apiVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP MDB2::apiVersion方法的具体用法?PHP MDB2::apiVersion怎么用?PHP MDB2::apiVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MDB2
的用法示例。
在下文中一共展示了MDB2::apiVersion方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_apiVersion
/**
* Tests that the MDB2::apiVersion() method returns an API version number.
*/
function test_apiVersion()
{
$result = MDB2::apiVersion();
$this->assertNotNull($result, 'apiVersion');
$result = strtok($result, '.');
$this->assertTrue(is_numeric($result), 'apiVersion');
$result = strtok('.');
$this->assertTrue(is_numeric($result), 'apiVersion');
$result = strtok('.');
$this->assertTrue(is_numeric($result), 'apiVersion');
}
示例2: test_apiVersion
/**
* Tests that the MDB2::apiVersion() method returns an API version number.
*/
function test_apiVersion()
{
$result = MDB2::apiVersion();
$this->assertNotNull($result, 'apiVersion null: ' . $result);
$result = strtok($result, '.');
$this->assertTrue(is_numeric($result), 'apiVersion major: ' . $result);
$result = strtok('.');
$this->assertTrue(is_numeric($result), 'apiVersion minor: ' . $result);
$result = strtok('.');
$this->assertRegExp('/\\d+((b|a|pl|rc)\\d+)?/', $result);
}
示例3: test_apiVersion
/**
* Tests that the MDB2::apiVersion() method returns an API version number.
* @dataProvider provider
*/
public function test_apiVersion($ci)
{
$this->manualSetUp($ci);
$result = MDB2::apiVersion();
if ('@' . 'package_version' . '@' == '@package_version@') {
$this->assertEquals('@' . 'package_version' . '@', $result);
return;
}
$this->assertNotNull($result, 'apiVersion null: ' . $result);
$result = strtok($result, '.');
$this->assertTrue(is_numeric($result), 'apiVersion major: ' . $result);
$result = strtok('.');
$this->assertTrue(is_numeric($result), 'apiVersion minor: ' . $result);
$result = strtok('.');
$this->assertRegExp('/\\d+((b|a|pl|rc)\\d+)?/', $result);
}