Added test for correct Semantic Versioning as per #34

This commit is contained in:
Katrina Knight
2021-09-02 23:09:50 +01:00
committed by Basilius Sauter
parent 5718f57c91
commit 83c3d697c9
4 changed files with 667 additions and 478 deletions
+1 -1
View File
@@ -83,4 +83,4 @@ Leads
* [austenmc](https://github.com/austenmc)
Other Contributors
* [nekosune](https://github.com/nekosune)
* [KatrinaAS](https://github.com/katrinaas)
+2 -1
View File
@@ -37,6 +37,7 @@
"require-dev": {
"phpunit/phpunit": "*",
"phpunit/php-code-coverage": "*",
"friendsofphp/php-cs-fixer": "*"
"friendsofphp/php-cs-fixer": "*",
"vierbergenlars/php-semver": "*"
}
}
Generated
+654 -476
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -31,6 +31,7 @@ use LotGD\Core\Exceptions\ {
ActionNotFoundException, CharacterNotFoundException, InvalidConfigurationException
};
use LotGD\Core\Events\EventContext;
use vierbergenlars\SemVer\version;
class DefaultSceneProvider implements EventHandler
{
@@ -343,4 +344,13 @@ class GameTest extends CoreModelTestCase
]
], $viewpointToArray($v3));
}
public function testCorrectVersioning(){
try {
$version=new version(Game::getVersion());
$this->assertTrue(true);
} catch(\RuntimeException $e) {
$this->fail(sprintf("Version failed SemVer check with error: %s",$e->getMessage()));
}
}
}