Skip to content

Fix unit tests

Fix unit tests #206

Triggered via push August 4, 2024 22:24
Status Failure
Total duration 1m 31s
Artifacts

php.yml

on: push
Matrix: unit-tests-linux
Matrix: unit-tests-windows
Code coverage
0s
Code coverage
Cleanup artifacts
0s
Cleanup artifacts
Fit to window
Zoom out
Zoom in

Annotations

12 errors and 11 warnings
UndefinedMethod: src/Controller/MonitorController.php#L156
src/Controller/MonitorController.php:156:16: UndefinedMethod: Method Symfony\Component\HttpFoundation\JsonResponse::create does not exist (see https://psalm.dev/022)
MissingClassConstType: src/State.php#L9
src/State.php:9:18: MissingClassConstType: Class constant "SimpleSAML\Module\monitor\State::OK" should have a declared type. (see https://psalm.dev/359)
MissingClassConstType: src/State.php#L10
src/State.php:10:18: MissingClassConstType: Class constant "SimpleSAML\Module\monitor\State::WARNING" should have a declared type. (see https://psalm.dev/359)
MissingClassConstType: src/State.php#L11
src/State.php:11:18: MissingClassConstType: Class constant "SimpleSAML\Module\monitor\State::NOSTATE" should have a declared type. (see https://psalm.dev/359)
MissingClassConstType: src/State.php#L12
src/State.php:12:18: MissingClassConstType: Class constant "SimpleSAML\Module\monitor\State::ERROR" should have a declared type. (see https://psalm.dev/359)
MissingClassConstType: src/State.php#L13
src/State.php:13:18: MissingClassConstType: Class constant "SimpleSAML\Module\monitor\State::FATAL" should have a declared type. (see https://psalm.dev/359)
MissingClassConstType: src/State.php#L14
src/State.php:14:18: MissingClassConstType: Class constant "SimpleSAML\Module\monitor\State::SKIPPED" should have a declared type. (see https://psalm.dev/359)
PossiblyNullReference: src/TestCase/AuthSource/Ldap/Bind.php#L37
src/TestCase/AuthSource/Ldap/Bind.php:37:44: PossiblyNullReference: Cannot call method getString on possibly null value (see https://psalm.dev/083)
PossiblyNullReference: src/TestCase/AuthSource/Ldap/Bind.php#L38
src/TestCase/AuthSource/Ldap/Bind.php:38:44: PossiblyNullReference: Cannot call method getString on possibly null value (see https://psalm.dev/083)
UndefinedDocblockClass: src/TestCase/AuthSource/Ldap/Configuration.php#L20
src/TestCase/AuthSource/Ldap/Configuration.php:20:5: UndefinedDocblockClass: Docblock-defined class, interface or enum named SimpleSAML\Module\ConnectorInterface does not exist (see https://psalm.dev/200)
UndefinedAttributeClass: tests/src/TestCase/Store/SqlTest.php#L18
tests/src/TestCase/Store/SqlTest.php:18:3: UndefinedAttributeClass: Attribute class PHPunit\Framework\Attributes\RequiresOperatingSystem does not exist (see https://psalm.dev/241)
Quality control
Process completed with exit code 2.
MixedArrayAssignment: hooks/hook_frontpage.php#L18
hooks/hook_frontpage.php:18:5: MixedArrayAssignment: Cannot access array value on mixed variable $links['config'] (see https://psalm.dev/117)
PropertyNotSetInConstructor: src/Controller/MonitorController.php#L56
src/Controller/MonitorController.php:56:19: PropertyNotSetInConstructor: Property SimpleSAML\Module\monitor\Controller\MonitorController::$state is not defined in constructor of SimpleSAML\Module\monitor\Controller\MonitorController or in any methods called in the constructor (see https://psalm.dev/074)
MixedInferredReturnType: src/Controller/MonitorController.php#L152
src/Controller/MonitorController.php:152:16: MixedInferredReturnType: Could not verify return type 'Symfony\Component\HttpFoundation\JsonResponse' for SimpleSAML\Module\monitor\Controller\MonitorController::processJson (see https://psalm.dev/047)
MixedReturnStatement: src/Controller/MonitorController.php#L156
src/Controller/MonitorController.php:156:16: MixedReturnStatement: Could not infer a return type (see https://psalm.dev/138)
MixedArrayAccess: src/Controller/MonitorController.php#L157
src/Controller/MonitorController.php:157:27: MixedArrayAccess: Cannot access array value on mixed variable $this->healthInfo[$this->state] (see https://psalm.dev/051)
MixedInferredReturnType: src/Monitor.php#L72
src/Monitor.php:72:16: MixedInferredReturnType: Could not verify return type 'int' for SimpleSAML\Module\monitor\Monitor::getState (see https://psalm.dev/047)
MixedReturnStatement: src/Monitor.php#L77
src/Monitor.php:77:16: MixedReturnStatement: Possibly-mixed return value (see https://psalm.dev/138)
MixedReturnStatement: src/Monitor.php#L77
src/Monitor.php:77:16: MixedReturnStatement: Could not infer a return type (see https://psalm.dev/138)
MixedAssignment: src/TestCase/AuthSource/Ldap/Bind.php#L34
src/TestCase/AuthSource/Ldap/Bind.php:34:9: MixedAssignment: Unable to determine the type that $this->connection is being assigned to (see https://psalm.dev/032)
MixedAssignment: src/TestCase/AuthSource/Ldap/Bind.php#L35
src/TestCase/AuthSource/Ldap/Bind.php:35:9: MixedAssignment: Unable to determine the type that $authSourceData is being assigned to (see https://psalm.dev/032)
MissingClassConstType: tests/src/MonitorTest.php#L17
tests/src/MonitorTest.php:17:19: MissingClassConstType: Class constant "SimpleSAML\Module\monitor\Test\MonitorTest::FRAMEWORK" should have a declared type. (see https://psalm.dev/359)