znt/module/install/test/model/getdatabaseversion.php

25 lines
601 B
PHP
Executable file
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env php
<?php
/**
title=测试 installModel->getDatabaseVersion();
timeout=0
cid=16771
- 检查是否能成功获取当前数据库版本。 @1
- 当driver为dm时候获取数据库版本。 @8
*/
include dirname(__FILE__, 5) . '/test/lib/init.php';
su('admin');
global $tester, $config;
$tester->loadModel('install');
r($tester->install->getDatabaseVersion() >= 1) && p() && e(1); // 检查是否能成功获取当前数据库版本。
$config->db->driver = 'dm';
r($tester->install->getDatabaseVersion()) && p() && e(8); // 当driver为dm时候获取数据库版本。