File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed
Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ class HydeKernel implements SerializableContract
4949 use Serializable;
5050 use Macroable;
5151
52- final public const VERSION = '1.1 .0 ' ;
52+ final public const VERSION = '1.2 .0 ' ;
5353
5454 protected static self $ instance ;
5555
Original file line number Diff line number Diff line change 44
55namespace Hyde \Framework \Testing \Feature ;
66
7+ use Throwable ;
78use Composer \InstalledVersions ;
89use Hyde \Facades \Features ;
910use Hyde \Foundation \Facades \Pages ;
@@ -294,11 +295,30 @@ public function test_version_constant_is_a_valid_semver_string()
294295 );
295296 }
296297
297- public function test_version_constant_is_up_to_date ()
298+ public function test_version_constant_is_up_to_date_with_composer ()
298299 {
299- $ this ->assertTrue (version_compare (
300- HydeKernel::VERSION , InstalledVersions::getPrettyVersion ('hyde/framework ' )
301- ) >= 0 );
300+ $ version = InstalledVersions::getPrettyVersion ('hyde/framework ' );
301+
302+ if (str_starts_with ($ version , 'dev- ' )) {
303+ $ this ->markTestSkipped ('Installed version is for development ' );
304+ }
305+
306+ $ this ->assertSame (HydeKernel::VERSION , $ version );
307+ }
308+
309+ public function test_version_constant_is_up_to_date_with_git ()
310+ {
311+ try {
312+ $ version = trim (shell_exec ('git describe --abbrev=0 --tags ' ));
313+ } catch (Throwable ) {
314+ $ this ->markTestSkipped ('Could not get version from Git ' );
315+ }
316+
317+ if ('v ' .HydeKernel::VERSION === $ version ) {
318+ $ this ->assertSame ('v ' .HydeKernel::VERSION , $ version );
319+ } else {
320+ $ this ->markTestSkipped ('Version constant does not match Git version! ' );
321+ }
302322 }
303323
304324 public function test_version_method_returns_version_constant ()
You can’t perform that action at this time.
0 commit comments