mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
28 lines
748 B
PHP
28 lines
748 B
PHP
<?php
|
|
|
|
namespace Tests\Unit\Migration;
|
|
|
|
use Appwrite\Migration\Migration;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class MigrationVersionsTest extends TestCase
|
|
{
|
|
/**
|
|
* Check versions array integrity.
|
|
*/
|
|
public function testMigrationVersions(): void
|
|
{
|
|
require_once __DIR__ . '/../../../app/init.php';
|
|
|
|
foreach (Migration::$versions as $class) {
|
|
$this->assertTrue(class_exists('Appwrite\\Migration\\Version\\' . $class));
|
|
}
|
|
|
|
// Test if current version exists
|
|
// Only test official releases - skip if latest is release candidate
|
|
if (!(\str_contains(APP_VERSION_STABLE, 'RC'))) {
|
|
$this->assertArrayHasKey(APP_VERSION_STABLE, Migration::$versions);
|
|
}
|
|
}
|
|
}
|