Skip to content

Commit 00993a3

Browse files
committed
test: add test for getVersion()
1 parent d334a2a commit 00993a3

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/**
4+
* This file is part of CodeIgniter 4 framework.
5+
*
6+
* (c) CodeIgniter Foundation <admin@codeigniter.com>
7+
*
8+
* For the full copyright and license information, please view
9+
* the LICENSE file that was distributed with this source code.
10+
*/
11+
12+
namespace CodeIgniter\Database\Live;
13+
14+
use CodeIgniter\Test\CIUnitTestCase;
15+
use CodeIgniter\Test\DatabaseTestTrait;
16+
17+
/**
18+
* @group DatabaseLive
19+
*
20+
* @internal
21+
*/
22+
final class GetVersionTest extends CIUnitTestCase
23+
{
24+
use DatabaseTestTrait;
25+
26+
protected $migrate = false;
27+
28+
public function testGetVersion()
29+
{
30+
$version = $this->db->getVersion();
31+
32+
$this->assertMatchesRegularExpression('/\A\d+(\.\d+)*\z/', $version);
33+
}
34+
}

0 commit comments

Comments
 (0)