mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
test: add test for getVersion()
This commit is contained in:
parent
d334a2a287
commit
00993a32cb
34
tests/system/Database/Live/GetVersionTest.php
Normal file
34
tests/system/Database/Live/GetVersionTest.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* This file is part of CodeIgniter 4 framework.
|
||||
*
|
||||
* (c) CodeIgniter Foundation <admin@codeigniter.com>
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CodeIgniter\Database\Live;
|
||||
|
||||
use CodeIgniter\Test\CIUnitTestCase;
|
||||
use CodeIgniter\Test\DatabaseTestTrait;
|
||||
|
||||
/**
|
||||
* @group DatabaseLive
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class GetVersionTest extends CIUnitTestCase
|
||||
{
|
||||
use DatabaseTestTrait;
|
||||
|
||||
protected $migrate = false;
|
||||
|
||||
public function testGetVersion()
|
||||
{
|
||||
$version = $this->db->getVersion();
|
||||
|
||||
$this->assertMatchesRegularExpression('/\A\d+(\.\d+)*\z/', $version);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user