3 declare(strict_types
=1);
5 namespace PhpMyAdmin\Tests
;
7 use PhpMyAdmin\Version
;
8 use PHPUnit\Framework\Attributes\CoversClass
;
12 #[CoversClass(Version::class)]
13 class VersionTest
extends AbstractTestCase
16 * Validate the current version
18 public function testValidateVersion(): void
20 self
::assertIsString(Version
::VERSION
);
21 self
::assertNotEmpty(Version
::VERSION
); // @phpstan-ignore-line
22 self
::assertStringContainsString(Version
::SERIES
, Version
::VERSION
, 'x.y must be found in x.y.z');
23 self
::assertIsInt(Version
::MAJOR
);
24 self
::assertIsInt(Version
::MINOR
);
25 self
::assertIsInt(Version
::PATCH
);
26 self
::assertTrue(Version
::MAJOR
>= 5);// @phpstan-ignore-line Just checking
27 self
::assertTrue(Version
::MINOR
>= 0);// @phpstan-ignore-line Just checking
28 self
::assertTrue(Version
::PATCH
>= 0);// @phpstan-ignore-line Just checking
29 self
::assertTrue(Version
::ID
>= 50000);// @phpstan-ignore-line Just checking
30 if (defined('VERSION_SUFFIX')) {
31 self
::assertIsString(VERSION_SUFFIX
);
34 self
::assertIsInt(Version
::ID
);
35 self
::assertIsString(Version
::PRE_RELEASE_NAME
);
36 self
::assertIsBool(Version
::IS_DEV
);