From 970c6b81276423191da521f46a4cba8cf54b3137 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 16 May 2024 02:14:53 +0000 Subject: [PATCH] Test fixes --- Config/phpstan.neon | 45 +-- Config/phpstan_autoloader.php | 8 +- Config/reportLang.php | 328 +++++++++--------- Helper/Php/buildER.php | 4 +- Helper/Php/createPhpFromJsonDb.php | 22 +- Helper/Php/langUsageInspector.php | 4 +- Helper/Scripts/helpImages.js | 72 ++++ .../{screenshots.js => pageScreenshots.js} | 2 +- {Tools => Helper/Scripts}/versionHash.sh | 0 Js/createImages.js | 162 --------- README.md | 2 +- Tools/jsBuilder.sh | 24 -- 12 files changed, 262 insertions(+), 411 deletions(-) create mode 100644 Helper/Scripts/helpImages.js rename Helper/Scripts/{screenshots.js => pageScreenshots.js} (99%) rename {Tools => Helper/Scripts}/versionHash.sh (100%) mode change 100755 => 100644 delete mode 100755 Js/createImages.js delete mode 100755 Tools/jsBuilder.sh diff --git a/Config/phpstan.neon b/Config/phpstan.neon index 7d21c98..3bc439f 100755 --- a/Config/phpstan.neon +++ b/Config/phpstan.neon @@ -28,7 +28,6 @@ parameters: - *Test.php - *Routes.php - *Hooks.php - - *ObjLoader.js - */vendor/* - */Demo/* - */Build/* @@ -38,11 +37,12 @@ parameters: - */Web/* - */Routes/* - */Hooks/* - - */DataStorage/Database/* - - */Message/Mail/* - - */Auth/OAuth2/* - - */Socket/* - */node_modules/* + - *ObjLoader.js + - */Socket/* + - */DataStorage/Database/* + - */Auth/OAuth2/* + - */Message/Mail/* - */Install/Application/* - */Accounting/* - */JobScheduling/* @@ -56,20 +56,9 @@ parameters: - *Datamatrix.php - *QR.php ignoreErrors: - - '#.*tag @var for constant.*#' - - '#[.]*Offset .* on array.* always exists[.]*#' - - '#[.]*separator of function explode expects non-empty-string[.]*#' - '#^Call to an undefined method phpOMS\\Module\\ModuleAbstract::[.]*#' - - '#^Strict comparison using === between[.]*#' - - '#.*key\(\) should return.*#' - - '#.*current\(\) should return.*#' - - '#.*offsetExists\(\) expects.*#' - - '#[.]*jsonSerialize\(\) has no return typehint specified#' - - '#.*unserialize\(\) has parameter .* with no typehint specified#' - '#expects phpOMS\\Algorithm\\PathFinding\\JumpPointNode\|null, phpOMS\\Algorithm\\PathFinding\\Node\|null given#' - '#should return array but returns array of constant phpOMS\\DataStorage\\Database\\Mapper\\DataMapperFactory::MODEL.*#' - - '#.*l11nServer.* does not accept.*#' - - '#.*Call to static method installExternal.*#' - '#.*MODEL is not covariant with type class-string.*#' - '#.*Access to an undefined property Default.*#' - - - message: '#.*has parameter \$con with no typehint specified#' - path: *Ftp/File.php - message: '#.*Constant PDF_.*#' path: *pdf.php @@ -97,24 +79,12 @@ parameters: - message: '#.*Cannot call method setId\(\) on mixed.*#' path: *View.php - - - message: "#^Cannot call method getTimestamp\\(\\) on DateTime\\|null\\.$#" - path: *Algorithm/JobScheduling/Weighted.php - - - message: '#Binary operation "\-" between string and int results in an error#' - path: *Matrix/Matrix.php - message: '#PHPDoc tag @return with type object is not subtype of native type phpOMS.*#' path: *Module/ModuleManager.php - message: '#.*continuousComparator\(\) is unused.*#' path: *Algorithm/Knapsack/Continuous.php - - - message: '#.*Empty array passed to foreach.*#' - path: *Admin/Install/Workflows* - - - message: '#.*app is never read.*#' - path: *Admin/Install/Workflows* - message: '#.*unknown class Modules\\Workflow\\Controller\\WorkflowInstance.*#' path: *Admin/Install/Workflows* @@ -126,7 +96,4 @@ parameters: path: *View.php* - message: '#.*of method TCPDF::setHeaderData\(\) expects string.*#' - path: *bill.pdf.php* - - - message: '#.*SessionInterface::\$data.*#' - path: *CliApplication.php* \ No newline at end of file + path: *bill.pdf.php* \ No newline at end of file diff --git a/Config/phpstan_autoloader.php b/Config/phpstan_autoloader.php index 8f3a133..760f32f 100755 --- a/Config/phpstan_autoloader.php +++ b/Config/phpstan_autoloader.php @@ -2,7 +2,7 @@ declare(strict_types=1); -function module_autoloader($class) { +function module_autoloader($class) : void { $paths = [ __DIR__ . '/../../', __DIR__ . '/../../Resources/', @@ -16,8 +16,8 @@ function module_autoloader($class) { __DIR__ . '/../../../', ]; - $class = \ltrim($class, '\\'); - $class = \strtr($class, '_\\', '//'); + $class = \ltrim($class, '\\'); + $class = \strtr($class, '_\\', '//'); if (\stripos($class, 'Web/Backend') !== false || \stripos($class, 'Web/Api') !== false) { $class = \str_replace('Web/', 'Install/Application/', $class); @@ -89,4 +89,4 @@ function module_autoloader($class) { } } -spl_autoload_register('module_autoloader'); +\spl_autoload_register('module_autoloader'); diff --git a/Config/reportLang.php b/Config/reportLang.php index d740c99..9edc7f6 100755 --- a/Config/reportLang.php +++ b/Config/reportLang.php @@ -10,60 +10,60 @@ return [ ':status:-3' => 'failure', ':status:-4' => 'error', // template language - ':testreport' => 'Test Report', - ':created' => 'Created', - ':version' => 'Version', - ':total' => 'Total', - ':covered' => 'Covered', - ':uncovered' => 'Uncovered', - ':methods' => 'Methods', - ':ratio' => 'Ratio', - ':statements' => 'Statements', - ':conditionals' => 'Conditionals', - ':successful' => 'OK', - ':skipps' => 'Skipps', - ':errors' => 'Errors', - ':warnings' => 'Warnings', - ':failures' => 'Failures', - ':description' => 'Description', - ':introduction' => 'Introduction', - ':introduction_desc_1' => 'This test report is automatically generated and includes information automatically generated by standard testing tools as well as custom tools in order to test and report the correctness as well as the quality of the software.', - ':structure' => 'Table of Contents', - ':structure_link_1' => 'Introduction', - ':structure_link_2' => 'Table of Contents', - ':structure_link_3' => 'Objective', - ':structure_link_4' => 'Testing Process', - ':structure_link_5' => 'Testing Summary', - ':structure_link_6' => 'Tests', - ':structure_link_9' => 'Disclaimer', - ':objective' => 'Objective', - ':objective_desc_1' => 'The objective of this report is to provide important information to users and auditors in order to check and re-validate the correctness and quality of the tested software. In this automatically generated report you can confirm if the functionality of the tested software is ensured. This is especially important and helpful for software updates and major version changes. By providing these test reports we hope to help customers, partners and auditors with their software validation processes due to internal or external requirements.', - ':testing_description' => 'Description', - ':testing_process' => 'Testing Process', - ':testing_process_desc_1' => 'Our goal is to provide as many and comprehensive tests as possible in order to ensure risks As Low As Reasonably Possible (ALARP). The tests we create can be categorized into multiple non-exclusive categories such as:', - ':testing_process_list_1' => 'Unit Tests vs. Integration Tests vs. System Tests vs. Static Tests vs. Code Style', - ':testing_process_list_2' => 'Frontend vs. Backend', - ':testing_process_list_3' => 'Internal vs. 3rd Party', - ':testing_process_list_4' => 'Framework vs. Library vs. Module', - ':testing_process_list_5' => 'Environment dependent vs. Environment independent', - ':testing_process_desc_2' => 'In addition to these functional tests we also do performance analysis of critical components. In addition to these automated tests we also do manual tests which are not included in this report during the development process and testing environments. New tests are constantly added and old tests are improved if applicable. In case tests become redundant or no longer provide any benefit due to software changes we may remove them.', - ':testing_process_desc_3' => 'The testing rulesets can be found at:', - ':testing_process_rules_1' => 'PhpUnit', - ':testing_process_rules_2' => 'PhpCS', - ':testing_process_rules_3' => 'PhpStan and Baseline', - ':testing_process_rules_4' => 'Eslint', - ':testing_summary' => 'Testing Summary', - ':testing_summary_coverage' => 'Coverage', - ':testing_summary_tests' => 'Tests', - ':testing_summary_desc_1' => 'This section contains a brief overview about the testing results.', - ':testing_summary_desc_2' => 'Total amount of assertions:', - ':testing_summary_desc_3' => 'Total testing time:', - ':tests' => 'Tests', - ':test_suits' => 'Test Suits', - ':static_tests' => 'Static Tests', - ':code_style' => 'Code Style', - ':disclaimer' => 'Disclaimer', - ':disclaimer_desc_1' => 'This test report doesn\'t provide any legal warrenty over completeness and correctness in case of damages of any kind.', + ':testreport' => 'Test Report', + ':created' => 'Created', + ':version' => 'Version', + ':total' => 'Total', + ':covered' => 'Covered', + ':uncovered' => 'Uncovered', + ':methods' => 'Methods', + ':ratio' => 'Ratio', + ':statements' => 'Statements', + ':conditionals' => 'Conditionals', + ':successful' => 'OK', + ':skipps' => 'Skipps', + ':errors' => 'Errors', + ':warnings' => 'Warnings', + ':failures' => 'Failures', + ':description' => 'Description', + ':introduction' => 'Introduction', + ':introduction_desc_1' => 'This test report is automatically generated and includes information automatically generated by standard testing tools as well as custom tools in order to test and report the correctness as well as the quality of the software.', + ':structure' => 'Table of Contents', + ':structure_link_1' => 'Introduction', + ':structure_link_2' => 'Table of Contents', + ':structure_link_3' => 'Objective', + ':structure_link_4' => 'Testing Process', + ':structure_link_5' => 'Testing Summary', + ':structure_link_6' => 'Tests', + ':structure_link_9' => 'Disclaimer', + ':objective' => 'Objective', + ':objective_desc_1' => 'The objective of this report is to provide important information to users and auditors in order to check and re-validate the correctness and quality of the tested software. In this automatically generated report you can confirm if the functionality of the tested software is ensured. This is especially important and helpful for software updates and major version changes. By providing these test reports we hope to help customers, partners and auditors with their software validation processes due to internal or external requirements.', + ':testing_description' => 'Description', + ':testing_process' => 'Testing Process', + ':testing_process_desc_1' => 'Our goal is to provide as many and comprehensive tests as possible in order to ensure risks As Low As Reasonably Possible (ALARP). The tests we create can be categorized into multiple non-exclusive categories such as:', + ':testing_process_list_1' => 'Unit Tests vs. Integration Tests vs. System Tests vs. Static Tests vs. Code Style', + ':testing_process_list_2' => 'Frontend vs. Backend', + ':testing_process_list_3' => 'Internal vs. 3rd Party', + ':testing_process_list_4' => 'Framework vs. Library vs. Module', + ':testing_process_list_5' => 'Environment dependent vs. Environment independent', + ':testing_process_desc_2' => 'In addition to these functional tests we also do performance analysis of critical components. In addition to these automated tests we also do manual tests which are not included in this report during the development process and testing environments. New tests are constantly added and old tests are improved if applicable. In case tests become redundant or no longer provide any benefit due to software changes we may remove them.', + ':testing_process_desc_3' => 'The testing rulesets can be found at:', + ':testing_process_rules_1' => 'PhpUnit', + ':testing_process_rules_2' => 'PhpCS', + ':testing_process_rules_3' => 'PhpStan and Baseline', + ':testing_process_rules_4' => 'Eslint', + ':testing_summary' => 'Testing Summary', + ':testing_summary_coverage' => 'Coverage', + ':testing_summary_tests' => 'Tests', + ':testing_summary_desc_1' => 'This section contains a brief overview about the testing results.', + ':testing_summary_desc_2' => 'Total amount of assertions:', + ':testing_summary_desc_3' => 'Total testing time:', + ':tests' => 'Tests', + ':test_suits' => 'Test Suits', + ':static_tests' => 'Static Tests', + ':code_style' => 'Code Style', + ':disclaimer' => 'Disclaimer', + ':disclaimer_desc_1' => 'This test report doesn\'t provide any legal warrenty over completeness and correctness in case of damages of any kind.', // report elements come below / the order is important and is the same as in the generated report. 'phpOMS\tests\Account\AccountManagerTest' => ['description' => 'Account/user manager to handle/access loaded accounts', 'type' => 'framework'], @@ -825,34 +825,34 @@ return [ 'phpOMS\tests\Math\Functions\FibonacciTest:testBinet' => ['description' => 'The binet formula returns fibonacci numbers', 'type' => 'framework'], 'phpOMS\tests\Math\Functions\FibonacciTest:testBinetFib' => ['description' => 'The binet formula and the fibonacci formula return the same results', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest' => ['description' => 'Various math functions', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testFactorial' => ['description' => 'The factorial of a number can be calculated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testBinomialCoefficient' => ['description' => 'The binomial coefficient can be calculated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testAckermann' => ['description' => 'The ackerman function can be calculated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testMultiplicativeInverseModulo' => ['description' => 'The multiplicative inverse module can be calculated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testOdd' => ['description' => 'A number can be checked if it is odd', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testEven' => ['description' => 'A number can be checked if it is even', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testCircularPosition' => ['description' => 'The relative number can be calculated on a circular number system (e.g. month in a diverging business year)', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testErf' => ['description' => 'The error function can be correctly approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testErfc' => ['description' => 'The complementary error function can be correctly approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\FunctionsTest:testGeneralizedHypergeometricFunction' => ['description' => 'The generalized hypergeometric function can be correctly calculated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest' => ['description' => 'Various math functions', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testFactorial' => ['description' => 'The factorial of a number can be calculated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testBinomialCoefficient' => ['description' => 'The binomial coefficient can be calculated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testAckermann' => ['description' => 'The ackerman function can be calculated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testMultiplicativeInverseModulo' => ['description' => 'The multiplicative inverse module can be calculated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testOdd' => ['description' => 'A number can be checked if it is odd', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testEven' => ['description' => 'A number can be checked if it is even', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testCircularPosition' => ['description' => 'The relative number can be calculated on a circular number system (e.g. month in a diverging business year)', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testErf' => ['description' => 'The error function can be correctly approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testErfc' => ['description' => 'The complementary error function can be correctly approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\FunctionsTest:testGeneralizedHypergeometricFunction' => ['description' => 'The generalized hypergeometric function can be correctly calculated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest' => ['description' => 'Gamma function', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest:testGamma' => ['description' => 'The gamma function can be approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest:testFactorial' => ['description' => 'The gamma function can be calculated for integers', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest:testApproximationSpouge' => ['description' => 'The gamma function can be approximated with the spouge formula', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest:testApproximationStirling' => ['description' => 'The gamma function can be approximated with the stirling formula', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest:testApproximationLanzos' => ['description' => 'The gamma function can be approximated with the lanzos formula', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest:testLogGamma' => ['description' => 'The log gamma function can be approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest:testFirstIncompleteGamma' => ['description' => 'The first incomplete gamma function can be approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest:testSecondIncompleteGamma' => ['description' => 'The second incomplete gamma function can be approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\GammaTest:testRegularizedGamma' => ['description' => 'The regularized incomplete gamma function can be approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest' => ['description' => 'Gamma function', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest:testGamma' => ['description' => 'The gamma function can be approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest:testFactorial' => ['description' => 'The gamma function can be calculated for integers', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest:testApproximationSpouge' => ['description' => 'The gamma function can be approximated with the spouge formula', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest:testApproximationStirling' => ['description' => 'The gamma function can be approximated with the stirling formula', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest:testApproximationLanzos' => ['description' => 'The gamma function can be approximated with the lanzos formula', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest:testLogGamma' => ['description' => 'The log gamma function can be approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest:testFirstIncompleteGamma' => ['description' => 'The first incomplete gamma function can be approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest:testSecondIncompleteGamma' => ['description' => 'The second incomplete gamma function can be approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\GammaTest:testRegularizedGamma' => ['description' => 'The regularized incomplete gamma function can be approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\BetaTest' => ['description' => 'Beta function', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\BetaTest:beta' => ['description' => 'The beta function can be approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\BetaTest:testLogBeta' => ['description' => 'The log beta function can be approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\BetaTest:testIncompleteBeta' => ['description' => 'The incomplete beta function can be approximated', 'type' => 'framework'], - 'phpOMS\tests\Math\Functions\BetaTest:testRegularizedBeta' => ['description' => 'The regularized beta function can be approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\BetaTest' => ['description' => 'Beta function', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\BetaTest:beta' => ['description' => 'The beta function can be approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\BetaTest:testLogBeta' => ['description' => 'The log beta function can be approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\BetaTest:testIncompleteBeta' => ['description' => 'The incomplete beta function can be approximated', 'type' => 'framework'], + 'phpOMS\tests\Math\Functions\BetaTest:testRegularizedBeta' => ['description' => 'The regularized beta function can be approximated', 'type' => 'framework'], 'phpOMS\tests\Math\Geometry\ConvexHull\MonotoneChainTest' => ['description' => 'Monotone chain', 'type' => 'framework'], 'phpOMS\tests\Math\Geometry\ConvexHull\MonotoneChainTest:testMonotoneChain' => ['description' => 'A convex hull can be formed from multiple points on a plane', 'type' => 'framework'], @@ -1346,9 +1346,9 @@ return [ 'phpOMS\tests\Module\ModuleAbstractTest:testLocalization' => ['description' => 'A module can load its own localization/language dataset', 'group' => 'framework'], 'phpOMS\tests\Module\ModuleAbstractTest:testModelFunctionsWithClosure' => ['description' => 'The model CRUD functions can be called with a closure', 'group' => 'framework'], - 'phpOMS\tests\Module\NullModuleTest' => ['description' => 'Basic module functionality'], - 'phpOMS\tests\Module\NullModuleTest:testInvalidModuleMethodCalls' => ['description' => 'A invalid module method call will create an error log', 'type' => 'framework'], - 'phpOMS\tests\Module\NullModuleTest:testModule' => ['description' => 'The null module is an instance of the module abstract', 'group' => 'framework'], + 'phpOMS\tests\Module\NullModuleTest' => ['description' => 'Basic module functionality'], + 'phpOMS\tests\Module\NullModuleTest:testInvalidModuleMethodCalls' => ['description' => 'A invalid module method call will create an error log', 'type' => 'framework'], + 'phpOMS\tests\Module\NullModuleTest:testModule' => ['description' => 'The null module is an instance of the module abstract', 'group' => 'framework'], 'phpOMS\tests\Module\PackageManagerTest' => ['description' => 'Manager for install/update packages'], 'phpOMS\tests\Module\PackageManagerTest:testPackageValidInstall' => ['description' => 'A package can be installed', 'type' => 'framework'], @@ -1515,11 +1515,11 @@ return [ 'phpOMS\tests\Stdlib\Graph\NodeTest:testNodeRelation' => ['description' => 'A node relationship can be defined', 'type' => 'framework'], 'phpOMS\tests\Stdlib\Graph\NodeTest:testNeighborsInputOutput' => ['description' => 'All neighbors of a node can be returned', 'type' => 'framework'], - 'phpOMS\tests\Stdlib\Graph\EdgeTest' => ['description' => 'Edge between nodes'], - 'phpOMS\tests\Stdlib\Graph\EdgeTest:testDefault' => ['description' => 'The edge has the expected default values after initialization', 'type' => 'framework'], - 'phpOMS\tests\Stdlib\Graph\EdgeTest:testDirected' => ['description' => 'An edge can be directed', 'type' => 'framework'], - 'phpOMS\tests\Stdlib\Graph\EdgeTest:testWeightInputOutput' => ['description' => 'An edge weight can be set and returned', 'type' => 'framework'], - 'phpOMS\tests\Stdlib\Graph\EdgeTest:testWeightComparison' => ['description' => 'Two edge weights can be compared', 'type' => 'framework'], + 'phpOMS\tests\Stdlib\Graph\EdgeTest' => ['description' => 'Edge between nodes'], + 'phpOMS\tests\Stdlib\Graph\EdgeTest:testDefault' => ['description' => 'The edge has the expected default values after initialization', 'type' => 'framework'], + 'phpOMS\tests\Stdlib\Graph\EdgeTest:testDirected' => ['description' => 'An edge can be directed', 'type' => 'framework'], + 'phpOMS\tests\Stdlib\Graph\EdgeTest:testWeightInputOutput' => ['description' => 'An edge weight can be set and returned', 'type' => 'framework'], + 'phpOMS\tests\Stdlib\Graph\EdgeTest:testWeightComparison' => ['description' => 'Two edge weights can be compared', 'type' => 'framework'], 'phpOMS\tests\Stdlib\Map\MultiMapTest' => ['description' => 'Map which associates multiple keys with the same value'], 'phpOMS\tests\Stdlib\Map\MultiMapTest:testDefault' => ['description' => 'The map has the expected default values and functionality after initialization', 'type' => 'framework'], @@ -1584,46 +1584,46 @@ return [ 'phpOMS\tests\Stdlib\Queue\PriorityQueueTest:testLowest' => ['description' => 'A lowest queue returns the elements in lowest priority order', 'type' => 'framework'], 'phpOMS\tests\Stdlib\Queue\PriorityQueueTest:testInvalidPriority' => ['description' => 'A invalid priority queue type throws a InvalidEnumValue', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest' => ['description' => 'Directory handler for local file system', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCreate' => ['description' => 'A directory can be created', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticExists' => ['description' => 'A directory can be checked for existence', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticOverwrite' => ['description' => 'An existing directory cannot be overwritten', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticSubdir' => ['description' => 'A directory can be forced to be created recursively', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticSubdir' => ['description' => 'By default a directory is not created recursively', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticName' => ['description' => 'The name of a directory is just its name without its path', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticBasename' => ['description' => 'The basename is the same as the name of the directory', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticDirname' => ['description' => 'The dirname is the same as the name of the directory', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticParent' => ['description' => 'The parent of a directory can be returned', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticDirectoryPath' => ['description' => 'The full absolute path of a directory can be returned', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCreatedAt' => ['description' => 'The directories creation date can be returned', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticChangedAt' => ['description' => 'The directories last change date can be returned', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticDelete' => ['description' => 'A directory can be deleted', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticDelete' => ['description' => 'A none-existing directory cannot be deleted', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticSizeRecursive' => ['description' => 'The size of a directory can be returned', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticSizeRecursive' => ['description' => 'The size of a none-existing directory is negative', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticSize' => ['description' => 'The recursive size of a directory is equals or greater than the size of the same directory none-recursive', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticPermission' => ['description' => 'The permission of a directory can be returned', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticPermission' => ['description' => 'The permission of a none-existing directory is negative', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCopy' => ['description' => 'A directory can be copied recursively', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCopyOverwrite' => ['description' => 'A directory can be forced to be copied to a different location even if the destination already exists', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticInvalidCopyOverwrite' => ['description' => 'By default a directory is not overwritten on copy', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticMove' => ['description' => 'A directory can be moved/renamed to a different path', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticInvalidMoveOverwrite' => ['description' => 'By default a directory is not overwritten on move', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticMoveOverwrite' => ['description' => 'A directory can be forced to be moved/renamed to a different path even if the destination already exists', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCountRecursive' => ['description' => 'The amount of files in a directory can be returned recursively', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCount' => ['description' => 'The amount of files in a directory can be returned none-recursively', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticCount' => ['description' => 'The amount of files of a none-existing directory is negative', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticListFiles' => ['description' => 'All files and sub-directories of a directory can be listed', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticListFilesByExtension' => ['description' => 'All files of a directory can be listed by file extension', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticOwner' => ['description' => 'The owner of a directory can be returned', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testDirectoryNameSanitizing' => ['description' => 'Invalid directory names and paths can be sanitized', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidListPath' => ['description' => 'A none-existing directory returns a empty list of files and sub-directories', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidListFilesByExtension' => ['description' => 'A none-existing directory returns a empty list of files for the extension', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidCopyPath' => ['description' => 'A invalid directory cannot be copied to a new destination', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidMovePath' => ['description' => 'A invalid directory cannot be moved to a new destination', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidCreatedPath' => ['description' => 'Reading the creation date of a none-existing directory throws a PathException', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidChangedPath' => ['description' => 'Reading the last change date of a none-existing directory throws a PathException', 'type' => 'framework'], - 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidOwnerPath' => ['description' => 'Reading the owner of a none-existing directory throws a PathException', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest' => ['description' => 'Directory handler for local file system', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCreate' => ['description' => 'A directory can be created', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticExists' => ['description' => 'A directory can be checked for existence', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticOverwrite' => ['description' => 'An existing directory cannot be overwritten', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticSubdir' => ['description' => 'A directory can be forced to be created recursively', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticSubdir' => ['description' => 'By default a directory is not created recursively', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticName' => ['description' => 'The name of a directory is just its name without its path', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticBasename' => ['description' => 'The basename is the same as the name of the directory', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticDirname' => ['description' => 'The dirname is the same as the name of the directory', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticParent' => ['description' => 'The parent of a directory can be returned', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticDirectoryPath' => ['description' => 'The full absolute path of a directory can be returned', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCreatedAt' => ['description' => 'The directories creation date can be returned', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticChangedAt' => ['description' => 'The directories last change date can be returned', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticDelete' => ['description' => 'A directory can be deleted', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticDelete' => ['description' => 'A none-existing directory cannot be deleted', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticSizeRecursive' => ['description' => 'The size of a directory can be returned', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticSizeRecursive' => ['description' => 'The size of a none-existing directory is negative', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticSize' => ['description' => 'The recursive size of a directory is equals or greater than the size of the same directory none-recursive', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticPermission' => ['description' => 'The permission of a directory can be returned', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticPermission' => ['description' => 'The permission of a none-existing directory is negative', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCopy' => ['description' => 'A directory can be copied recursively', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCopyOverwrite' => ['description' => 'A directory can be forced to be copied to a different location even if the destination already exists', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticInvalidCopyOverwrite' => ['description' => 'By default a directory is not overwritten on copy', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticMove' => ['description' => 'A directory can be moved/renamed to a different path', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticInvalidMoveOverwrite' => ['description' => 'By default a directory is not overwritten on move', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticMoveOverwrite' => ['description' => 'A directory can be forced to be moved/renamed to a different path even if the destination already exists', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCountRecursive' => ['description' => 'The amount of files in a directory can be returned recursively', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticCount' => ['description' => 'The amount of files in a directory can be returned none-recursively', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidStaticCount' => ['description' => 'The amount of files of a none-existing directory is negative', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticListFiles' => ['description' => 'All files and sub-directories of a directory can be listed', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticListFilesByExtension' => ['description' => 'All files of a directory can be listed by file extension', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testStaticOwner' => ['description' => 'The owner of a directory can be returned', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testDirectoryNameSanitizing' => ['description' => 'Invalid directory names and paths can be sanitized', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidListPath' => ['description' => 'A none-existing directory returns a empty list of files and sub-directories', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidListFilesByExtension' => ['description' => 'A none-existing directory returns a empty list of files for the extension', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidCopyPath' => ['description' => 'A invalid directory cannot be copied to a new destination', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidMovePath' => ['description' => 'A invalid directory cannot be moved to a new destination', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidCreatedPath' => ['description' => 'Reading the creation date of a none-existing directory throws a PathException', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidChangedPath' => ['description' => 'Reading the last change date of a none-existing directory throws a PathException', 'type' => 'framework'], + 'phpOMS\tests\System\File\Local\DirectoryTest:testInvalidOwnerPath' => ['description' => 'Reading the owner of a none-existing directory throws a PathException', 'type' => 'framework'], 'phpOMS\tests\System\File\Local\FileTest' => ['description' => 'File handler for local file system', 'type' => 'framework'], 'phpOMS\tests\System\File\Local\FileTest:testStaticCreate' => ['description' => 'A file without content can be created', 'type' => 'framework'], @@ -1950,8 +1950,8 @@ return [ 'phpOMS\tests\Utils\Converter\MeasurementTest:testInvalidFileSizeFrom' => ['description' => 'Invalid conversion from unknown filesize throws a InvalidArgumentException', 'type' => 'framework'], 'phpOMS\tests\Utils\Converter\MeasurementTest:testInvalidFileSizeTo' => ['description' => 'Invalid conversion to unknown filesize throws a InvalidArgumentException', 'type' => 'framework'], - 'phpOMS\tests\Utils\Converter\FileSizeTypeTest' => ['description' => 'File size types', 'type' => 'framework'], - 'phpOMS\tests\Utils\Converter\FileSizeTypeTest:testAutoFormat' => ['description' => 'File sizes can get automatically formatted according to their size', 'type' => 'framework'], + 'phpOMS\tests\Utils\Converter\FileSizeTypeTest' => ['description' => 'File size types', 'type' => 'framework'], + 'phpOMS\tests\Utils\Converter\FileSizeTypeTest:testAutoFormat' => ['description' => 'File sizes can get automatically formatted according to their size', 'type' => 'framework'], 'phpOMS\tests\Utils\Converter\NumericTest' => ['description' => 'Numeric converter', 'type' => 'framework'], 'phpOMS\tests\Utils\Converter\NumericTest:testArabicToRoman' => ['description' => 'Arabic numbers can be converted to roman numbers', 'type' => 'framework'], @@ -2043,20 +2043,20 @@ return [ 'phpOMS\tests\Utils\IO\Zip\TarGzTest:testInvalidUnpackSource' => ['description' => 'A none-existing source cannot be unpacked', 'type' => 'framework'], 'phpOMS\tests\Utils\IO\Zip\TarGzTest:testInvalidUnpackDestination' => ['description' => 'A destination cannot be overwritten', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\TarTest' => ['description' => 'Tar archive', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\TarTest:testTar' => ['description' => 'Data can be tar packed and unpacked', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\TarTest:testInvalidTarUnpack' => ['description' => 'Extracting invalid tar files fail', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\TarTest:testInvalidTar' => ['description' => 'A tar archive cannot be overwritten by default', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\TarTest:testInvalidUnpackSource' => ['description' => 'A none-existing source cannot be unpacked', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\TarTest:testInvalidUnpackDestination' => ['description' => 'A destination cannot be overwritten', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\TarTest' => ['description' => 'Tar archive', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\TarTest:testTar' => ['description' => 'Data can be tar packed and unpacked', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\TarTest:testInvalidTarUnpack' => ['description' => 'Extracting invalid tar files fail', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\TarTest:testInvalidTar' => ['description' => 'A tar archive cannot be overwritten by default', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\TarTest:testInvalidUnpackSource' => ['description' => 'A none-existing source cannot be unpacked', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\TarTest:testInvalidUnpackDestination' => ['description' => 'A destination cannot be overwritten', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\ZipTest' => ['description' => 'Zip archive', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\ZipTest:testZip' => ['description' => 'Data can be zip packed and unpacked', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidZipDestination' => ['description' => 'The output of the zip archive needs to be properly defined', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidZipUnpack' => ['description' => 'Extracting invalid zip files fail', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidZip' => ['description' => 'A zip archive cannot be overwritten by default', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidUnpackSource' => ['description' => 'A none-existing source cannot be unpacked', 'type' => 'framework'], - 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidUnpackDestination' => ['description' => 'A destination cannot be overwritten', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\ZipTest' => ['description' => 'Zip archive', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\ZipTest:testZip' => ['description' => 'Data can be zip packed and unpacked', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidZipDestination' => ['description' => 'The output of the zip archive needs to be properly defined', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidZipUnpack' => ['description' => 'Extracting invalid zip files fail', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidZip' => ['description' => 'A zip archive cannot be overwritten by default', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidUnpackSource' => ['description' => 'A none-existing source cannot be unpacked', 'type' => 'framework'], + 'phpOMS\tests\Utils\IO\Zip\ZipTest:testInvalidUnpackDestination' => ['description' => 'A destination cannot be overwritten', 'type' => 'framework'], 'phpOMS\tests\Utils\Parser\Php\ArrayParserTest' => ['description' => 'Array data serializer as code', 'type' => 'framework'], 'phpOMS\tests\Utils\Parser\Php\ArrayParserTest:testParser' => ['description' => 'An array can be encoded and decoded as php code', 'type' => 'framework'], @@ -2132,14 +2132,14 @@ return [ 'phpOMS\tests\Utils\TaskSchedule\SchedulerFactoryTest' => ['description' => 'Scheduler factory for creating cron/task handlers', 'type' => 'framework'], 'phpOMS\tests\Utils\TaskSchedule\SchedulerFactoryTest:testCreate' => ['description' => 'The correct scheduler is crated depending on the operating system', 'type' => 'framework'], - 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest' => ['description' => 'Job/task abstraction', 'type' => 'framework'], - 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testDefault' => ['description' => 'The task abstraction has the expected default values after initialization', 'type' => 'framework'], - 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testCommandInputOutput' => ['description' => 'The command can be set and returned', 'type' => 'framework'], - 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testIntervalInputOutput' => ['description' => 'The interval can be set and returned', 'type' => 'framework'], - 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testStatusInputOutput' => ['description' => 'The status can be set and returned', 'type' => 'framework'], - 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testCommentInputOutput' => ['description' => 'The comment can be set and returned', 'type' => 'framework'], - 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testLastRuntimeInputOutput' => ['description' => 'The last runtime can be set and returned', 'type' => 'framework'], - 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testNextRuntimeInputOutput' => ['description' => 'The next runtime can be set and returned', 'type' => 'framework'], + 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest' => ['description' => 'Job/task abstraction', 'type' => 'framework'], + 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testDefault' => ['description' => 'The task abstraction has the expected default values after initialization', 'type' => 'framework'], + 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testCommandInputOutput' => ['description' => 'The command can be set and returned', 'type' => 'framework'], + 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testIntervalInputOutput' => ['description' => 'The interval can be set and returned', 'type' => 'framework'], + 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testStatusInputOutput' => ['description' => 'The status can be set and returned', 'type' => 'framework'], + 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testCommentInputOutput' => ['description' => 'The comment can be set and returned', 'type' => 'framework'], + 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testLastRuntimeInputOutput' => ['description' => 'The last runtime can be set and returned', 'type' => 'framework'], + 'phpOMS\tests\Utils\TaskSchedule\TaskAbstractTest:testNextRuntimeInputOutput' => ['description' => 'The next runtime can be set and returned', 'type' => 'framework'], 'phpOMS\tests\Utils\TaskSchedule\TaskFactoryTest' => ['description' => 'Task factory for creating cron jobs/tasks', 'type' => 'framework'], 'phpOMS\tests\Utils\TaskSchedule\TaskFactoryTest:testFactory' => ['description' => 'The correct task is crated depending on the operating system', 'type' => 'framework'], @@ -2187,7 +2187,7 @@ return [ 'phpOMS\tests\Utils\PermutationTest:testPermute' => ['description' => 'An array can be permuted', 'type' => 'framework'], 'phpOMS\tests\Utils\PermutationTest:testIsPermutation' => ['description' => 'Two string can be checked if they are a permutation of each other', 'type' => 'framework'], 'phpOMS\tests\Utils\PermutationTest:testIsPalindrome' => ['description' => 'A string can be checked if it is a palindrome', 'type' => 'framework'], - 'phpOMS\tests\Utils\PermutationTest:testPermute' => ['description' => 'An array can be permuted with a permutation key', 'type' => 'framework'], + 'phpOMS\tests\Utils\PermutationTest:testPermute' => ['description' => 'An array can be permuted with a permutation key', 'type' => 'framework'], 'phpOMS\tests\Utils\PermutationTest:testWrongPermuteKeyLength' => ['description' => 'A none-existing permutation key throws a OutOfBoundsException', 'type' => 'framework'], 'phpOMS\tests\Utils\StringCompareTest' => ['description' => 'String comparison / dictionary', 'type' => 'framework'], @@ -2195,18 +2195,18 @@ return [ 'phpOMS\tests\Utils\StringCompareTest:testInvalidDictionary' => ['description' => 'A string doesn\'t match a dictionary entry if it is very different', 'type' => 'framework'], 'phpOMS\tests\Utils\StringCompareTest:testDictionaryAdd' => ['description' => 'A new dictionary entry can be created and returned', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest' => ['description' => 'String utilities', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testEntropy' => ['description' => 'The entropy of a string can be calculated', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testStarts' => ['description' => 'A string can be checked if it starts with a defined string', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testEnds' => ['description' => 'A string can be checked if it ends with a defined string', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testContains' => ['description' => 'A string can be checked if it contains at least one defined string element', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testCountBeginning' => ['description' => 'The amount of a defined characters in the beginning of a string can be counted', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testIntHash' => ['description' => 'A string creates a integer hash', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testSameHash' => ['description' => 'The same string creates the same hash', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testDifferentHash' => ['description' => 'Different strings create different hashes', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testStringify' => ['description' => 'Various data types can be stringified', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testInvalidStringify' => ['description' => 'Stringify/rendering a unknown data type returns null', 'type' => 'framework'], - 'phpOMS\tests\Utils\StringUtilsTest:testStringDiffHtml' => ['description' => 'The difference between two strings can be evaluated', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest' => ['description' => 'String utilities', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testEntropy' => ['description' => 'The entropy of a string can be calculated', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testStarts' => ['description' => 'A string can be checked if it starts with a defined string', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testEnds' => ['description' => 'A string can be checked if it ends with a defined string', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testContains' => ['description' => 'A string can be checked if it contains at least one defined string element', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testCountBeginning' => ['description' => 'The amount of a defined characters in the beginning of a string can be counted', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testIntHash' => ['description' => 'A string creates a integer hash', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testSameHash' => ['description' => 'The same string creates the same hash', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testDifferentHash' => ['description' => 'Different strings create different hashes', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testStringify' => ['description' => 'Various data types can be stringified', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testInvalidStringify' => ['description' => 'Stringify/rendering a unknown data type returns null', 'type' => 'framework'], + 'phpOMS\tests\Utils\StringUtilsTest:testStringDiffHtml' => ['description' => 'The difference between two strings can be evaluated', 'type' => 'framework'], 'phpOMS\tests\Utils\MbStringUtilsTest' => ['description' => 'Multi-Byte string utilities', 'type' => 'framework'], 'phpOMS\tests\Utils\MbStringUtilsTest:testEntropy' => ['description' => 'The entropy of a string can be calculated', 'type' => 'framework'], diff --git a/Helper/Php/buildER.php b/Helper/Php/buildER.php index a348a85..f012edf 100644 --- a/Helper/Php/buildER.php +++ b/Helper/Php/buildER.php @@ -4,8 +4,6 @@ declare(strict_types=1); require_once __DIR__ . '/../../../phpOMS/Autoloader.php'; -use \phpOMS\Autoloader; - $module = 'Billing'; if ($module === '..' || $module === '.' || !\is_dir(__DIR__ . '/../../../Modules/' . $module) @@ -64,4 +62,4 @@ foreach ($mappers as $mapper) { echo \str_repeat(' ', $indent), \substr($mapper, 0, -10), ' }|--|{ ', $childMapper, " : contains\n"; } -} \ No newline at end of file +} diff --git a/Helper/Php/createPhpFromJsonDb.php b/Helper/Php/createPhpFromJsonDb.php index eb20b3b..6bb89c7 100644 --- a/Helper/Php/createPhpFromJsonDb.php +++ b/Helper/Php/createPhpFromJsonDb.php @@ -1,9 +1,9 @@ - $this->id, + 'id' => {$this->id}, ]; } @@ -122,7 +122,7 @@ class {$name} implements \JsonSerializable */ public function jsonSerialize() : mixed { - return $this->toArray(); + return {$this->toArray}(); } } @@ -161,13 +161,13 @@ final class Null{$name} extends {$name} /** * Constructor * - * @param int $id Model id + * @param int {$id} Model id * * @since 1.0.0 */ - public function __construct(int $id = 0) + public function __construct(int {$id} = 0) { - $this->id = $id; + {$this->id} = {$id}; } /** @@ -175,10 +175,10 @@ final class Null{$name} extends {$name} */ public function jsonSerialize() : mixed { - return ['id' => $this->id]; + return ['id' => {$this->id}]; } } NULLMODEL; -\file_put_contents($output . 'Null' . $name . '.php', $nullmodel); \ No newline at end of file +\file_put_contents($output . 'Null' . $name . '.php', $nullmodel); diff --git a/Helper/Php/langUsageInspector.php b/Helper/Php/langUsageInspector.php index 3ab95e1..791d942 100644 --- a/Helper/Php/langUsageInspector.php +++ b/Helper/Php/langUsageInspector.php @@ -92,8 +92,8 @@ foreach ($sources as $source) { && (($temp = \strlen($source->getPathname()) - \strlen('lang.php')) >= 0 && \strpos($source->getPathname(), 'lang.php', $temp) !== false) && \strlen(\explode('.', \basename($source->getPathname()))[0]) === 2 ) { - $file = \file_get_contents($source->getPathname()); - $lines = \explode("\n", $file); + $file = \file_get_contents($source->getPathname()); + $lines = \explode("\n", $file); $exclude = []; foreach ($lines as $line) { diff --git a/Helper/Scripts/helpImages.js b/Helper/Scripts/helpImages.js new file mode 100644 index 0000000..7198e3b --- /dev/null +++ b/Helper/Scripts/helpImages.js @@ -0,0 +1,72 @@ +const {By,Key,Builder} = require("selenium-webdriver"); +const chrome = require('selenium-webdriver/chrome'); + +const { promises: fs} = require('fs'); +const fsync = require('fs'); +const path = require('path'); + +async function Screenshot(driver, url, xpath, output) { + const dir = path.dirname(output); + if (!fsync.existsSync(dir)) { + fsync.mkdirSync(dir, { recursive: true }); + } + + await driver.get(url).then(function () { + if (url.includes('#')) { + driver.findElement(By.css('label[for=' + url.substring(url.indexOf('#') + 1) + ']')).click(); + } + + return driver.findElement(By.xpath(xpath)); + }).then(function (ele) { + ele.click(); + driver.actions().scroll(0, 0, 0, 0, ele).perform(); + + return ele; + }).then(function (ele) { + return ele.takeScreenshot(true); + }).then(function (encodedString) { + return fsync.writeFileSync(output, encodedString, 'base64'); + }); +} + +const base = 'http://192.168.178.38/en'; + +(async function createImages() { + const driver = await new Builder().forBrowser("chrome").build(); + await driver.get(base); + await driver.manage().setTimeouts({ implicit: 3000 }); + await driver.manage().window().setRect({ width: 1920, height: 1080 }); + await driver.findElement(By.id('iLoginButton')).click(); + await driver.sleep(1000); + + const files = await fs.readdir(__dirname + '/../../../Modules'); + const length = files.length; + + for (let i = 0; i < length; ++i) { + try { + const src = JSON.parse(fsync.readFileSync(__dirname + '/../../../Modules/' + files[i] +'/Docs/img.json', 'utf8')); + await loop (driver, src) + } catch (e) { + //console.log(e.message); + } + } + + await driver.quit(); +})(); + +async function loop(driver, src) { + const length = src.length; + for (let i = 0; i < length; ++i) { + try { + await Screenshot(driver, + base + src[i][0], + src[i][1], + __dirname + '/../../../Modules' + src[i][2] + ); + } catch(error) { + console.error(error); + } + } +}; + +// "C:\Program Files\nodejs\node.exe" Build/Js/createImages.js \ No newline at end of file diff --git a/Helper/Scripts/screenshots.js b/Helper/Scripts/pageScreenshots.js similarity index 99% rename from Helper/Scripts/screenshots.js rename to Helper/Scripts/pageScreenshots.js index 5cf01a7..51eef8f 100644 --- a/Helper/Scripts/screenshots.js +++ b/Helper/Scripts/pageScreenshots.js @@ -1,6 +1,6 @@ const {By,Key,Builder} = require("selenium-webdriver"); const chrome = require('selenium-webdriver/chrome'); -const http = require('http'); + let fs = require('fs'); let path = require('path'); diff --git a/Tools/versionHash.sh b/Helper/Scripts/versionHash.sh old mode 100755 new mode 100644 similarity index 100% rename from Tools/versionHash.sh rename to Helper/Scripts/versionHash.sh diff --git a/Js/createImages.js b/Js/createImages.js deleted file mode 100755 index 977f272..0000000 --- a/Js/createImages.js +++ /dev/null @@ -1,162 +0,0 @@ -const {By,Key,Builder} = require("selenium-webdriver"); -const chrome = require('selenium-webdriver/chrome'); - -let fs = require('fs'); -let path = require('path'); - -const delay = ms => new Promise(resolve => setTimeout(resolve, ms)); - -async function Screenshot(url, xpath, output) { - let driver = await new Builder().forBrowser("chrome").build(); - - let dir = path.dirname(output); - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir, { recursive: true }); - } - - await driver.get(url).then(function () { - return driver.manage().setTimeouts({implicit: 3000}); - }).then(function () { - return driver.manage().window().setRect({width: 1024, height: 800}); - }).then(function () { - return driver.findElement(By.id("iLoginButton")).click(); - }).then(function () { - return driver.sleep(2000); - }).then(function () { - return driver.findElement(By.xpath(xpath)); - }).then(function (ele) { - return ele.takeScreenshot(true); - }).then(function (encodedString) { - return fs.writeFileSync(output, encodedString, 'base64'); - }); - - return driver.quit(); -} - -const src = [ - // Help - [ - 'http://192.168.178.38/en/help/general', - '//*[@id="content"]', - __dirname + '/../../Modules/Help/Docs/Help/img/help-general-readme.png' - ], - - [ - 'http://192.168.178.38/en/help/module/list', - '//*[@id="content"]', - __dirname + '/../../Modules/Help/Docs/Help/img/help-general-module-list.png' - ], - [ - 'http://192.168.178.38/en/backend/help/module/view?id=Admin', - '//*[@id="content"]', - __dirname + '/../../Modules/Help/Docs/Help/img/help-general-module-readme.png' - ], - [ - 'http://192.168.178.38/en/backend/help/module/view?id=Admin&page=Dev%2Fstructure', - '//*[@id="content"]', - __dirname + '/../../Modules/Help/Docs/Help/img/help-general-module-structure.png' - ], - - [ - 'http://192.168.178.38/en/help/developer?id=Admin&page=Dev%2Fstructure', - '//*[@id="content"]', - __dirname + '/../../Modules/Help/Docs/Help/img/help-developer-readme.png' - ], - - // Groups - [ - 'http://192.168.178.38/en/admin/group/view?id=3#c-tab-3', - '//*[@id="permissionForm"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-group-settings-permission-form.png' - ], - [ - 'http://192.168.178.38/en/admin/group/view?id=3#c-tab-3', - '//*[@id="igroup-tabs"]/div[2]/div[3]/div/div[2]/div', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-group-settings-permission-list.png' - ], - - // Accounts - [ - 'http://192.168.178.38/en/admin/account/view?id=1#c-tab-3', - '//*[@id="permissionForm"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-account-settings-permission-form.png' - ], - [ - 'http://192.168.178.38/en/admin/account/view?id=1#c-tab-3', - '//*[@id="iaccount-tabs"]/div[2]/div[3]/div/div[2]/div', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-account-settings-permission-list.png' - ], - - // Modules - [ - 'http://192.168.178.38/en/admin/module/info?id=Admin', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-info.png' - ], - [ - 'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-1', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-general.png' - ], - [ - 'http://192.168.178.38/en/admin/module/navigation/list?id=Admin', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-navigation.png' - ], - [ - 'http://192.168.178.38/en/admin/module/route/list?id=Admin', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-routes.png' - ], - [ - 'http://192.168.178.38/en/admin/module/hook/list?id=Admin', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-hooks.png' - ], - [ - 'http://192.168.178.38/en/admin/module/log?id=Admin', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-settings-logs.png' - ], - - // Admin-settings - [ - 'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-1', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-admin-settings-general.png' - ], - [ - 'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-2', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-admin-settings-localization.png' - ], - [ - 'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-3', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-admin-settings-design.png' - ], - [ - 'http://192.168.178.38/en/admin/module/settings?id=Admin#c-tab-5', - '//*[@id="content"]', - __dirname + '/../../Modules/Admin/Docs/Help/img/admin-module-admin-settings-list.png' - ], -]; -const length = src.length; - -(async function loop() { - for (let i = 0; i < length; ++i) { - try { - Screenshot( - src[i][0], - src[i][1], - src[i][2] - ); - - await delay(1000); - } catch(error) { - console.error(error); - } - } -})(); - -// "C:\Program Files\nodejs\node.exe" Build/Js/createImages.js \ No newline at end of file diff --git a/README.md b/README.md index 9f1be61..4f79431 100755 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # General -The Karaka build system is a collection of scripts to create builds. Builds that can get created are: +The Jingga build system is a collection of scripts to create builds. Builds that can get created are: * Public release builds * Public developer release builds diff --git a/Tools/jsBuilder.sh b/Tools/jsBuilder.sh deleted file mode 100755 index 79f490e..0000000 --- a/Tools/jsBuilder.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -echo "" > ${OUT} -for i in "${SRC[@]}" -do - cat $i >> ${OUT} - echo "" >> ${OUT} -done - -java -jar ${TOOLS_PATH}/closure-compiler* --compilation_level WHITESPACE_ONLY --js ${OUT} --js_output_file ${OUT}.min -rm ${OUT} -mv ${OUT}.min ${OUT} - -# Remove spaces at end of line -sed -i -e 's/[[:blank:]]*$//g' ${OUT} -# Make single line -sed -i -e ':a;N;$!ba;s/\n/ /g' ${OUT} -# Remove multiple spaces -sed -i -e 's/ */ /g' ${OUT} -# Remove double js initialization -sed -i -e 's/(function *(jsOMS) *{ *"use strict";//g' ${OUT} -sed -i -e 's/} *(window.jsOMS *= *window.jsOMS *|| *{}));//g' ${OUT} - -echo "(function(jsOMS){\"use strict\";$(cat ${OUT})}(window.jsOMS = window.jsOMS || {}));" > ${OUT} \ No newline at end of file