From fd1e7e6a282afd46f8bc3e87907af846f59d8029 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Fri, 28 Jun 2024 21:49:05 +0200 Subject: [PATCH] Remove tests for if the version constant is up to date or not This was useful way back when when we used a manual versioning system and this could catch cases where I messed up, but now that versioning is automated this is not needed. --- .../tests/Feature/HydeKernelTest.php | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/packages/framework/tests/Feature/HydeKernelTest.php b/packages/framework/tests/Feature/HydeKernelTest.php index d59dc86f679..117d455ff46 100644 --- a/packages/framework/tests/Feature/HydeKernelTest.php +++ b/packages/framework/tests/Feature/HydeKernelTest.php @@ -4,9 +4,7 @@ namespace Hyde\Framework\Testing\Feature; -use Throwable; use Hyde\Enums\Feature; -use Composer\InstalledVersions; use Hyde\Facades\Features; use Hyde\Foundation\Facades\Pages; use Hyde\Foundation\Facades\Routes; @@ -306,34 +304,6 @@ public function testVersionConstantIsAValidSemverString() ); } - public function testVersionConstantIsUpToDateWithComposer() - { - $version = InstalledVersions::getPrettyVersion('hyde/framework'); - - if (str_starts_with($version, 'dev-')) { - $this->markTestSkipped('Installed version is for development'); - } - - $this->assertSame(HydeKernel::VERSION, $version); - } - - public function testVersionConstantIsUpToDateWithGit() - { - try { - $version = trim(shell_exec('git describe --abbrev=0 --tags')); - } catch (Throwable) { - // Gracefully skip the test if the version cannot be fetched - $this->markTestSkipped('Could not get version from Git'); - } - - if ('v'.HydeKernel::VERSION === $version) { - $this->assertSame('v'.HydeKernel::VERSION, $version); - } else { - // Gracefully skip the test if the version is not up-to-date - $this->markTestSkipped('Version constant does not match Git version!'); - } - } - public function testVersionMethodReturnsVersionConstant() { $this->assertSame(HydeKernel::VERSION, Hyde::version());