Skip to content

Commit 33e8ef2

Browse files
committed
TASK: Add composer test:unit command
Also fixed some php 8.4 deprecation warnings in test
1 parent 0d99e41 commit 33e8ef2

4 files changed

Lines changed: 14 additions & 2 deletions

File tree

Neos.Cache/Tests/Unit/Backend/AbstractBackendTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class_exists(AbstractBackend::class);
3838
eval('
3939
#[\AllowDynamicProperties]
4040
class ' . $className . ' extends \Neos\Cache\Backend\AbstractBackend {
41-
public function set(string $entryIdentifier, string $data, array $tags = [], int $lifetime = NULL): void {}
41+
public function set(string $entryIdentifier, string $data, array $tags = [], ?int $lifetime = NULL): void {}
4242
public function get(string $entryIdentifier): string {}
4343
public function has(string $entryIdentifier): bool {}
4444
public function remove(string $entryIdentifier): bool {}

Neos.Flow.Log/Tests/Unit/Backend/AbstractBackendTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function setUp(): void
3434
class ' . $this->backendClassName . ' extends \Neos\Flow\Log\Backend\AbstractBackend {
3535
protected $someOption;
3636
public function open(): void {}
37-
public function append(string $message, int $severity = 1, $additionalData = NULL, string $packageKey = NULL, string $className = NULL, string $methodName = NULL): void {}
37+
public function append(string $message, int $severity = 1, $additionalData = NULL, ?string $packageKey = NULL, ?string $className = NULL, ?string $methodName = NULL): void {}
3838
public function close(): void {}
3939
public function setSomeOption($value) {
4040
$this->someOption = $value;

Neos.Flow/Tests/Unit/Cli/CommandManagerTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ class CommandManagerTest extends UnitTestCase
3737
*/
3838
protected $mockBootstrap;
3939

40+
/**
41+
* @var ObjectManagerInterface
42+
*/
43+
protected $mockObjectManager;
44+
4045
/**
4146
* @var Cli\CommandManager
4247
*/

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@
1010
"../../flow doctrine:migrate --quiet",
1111
"../../bin/behat -f progress -c Neos.Flow/Tests/Behavior/behat.yml"
1212
],
13+
"test:unit": [
14+
"../../bin/phpunit -c ../../Build/BuildEssentials/PhpUnit/UnitTests.xml "
15+
],
16+
"test": [
17+
"@test:unit",
18+
"@test:behavioral"
19+
],
1320
"lint:phpstan-legacy": "../../bin/phpstan analyse -c phpstan-legacy.neon.dist -v",
1421
"lint:phpstan-cc": "../../bin/phpstan clear-result-cache",
1522
"lint:phpstan": "../../bin/phpstan analyse -c phpstan.neon.dist -v --memory-limit 256M",

0 commit comments

Comments
 (0)