Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions Classes/Tests/UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,6 @@ protected function setUp()
]);
}

protected function configureMockedTranslationService()
{
$translationService = $this->getMockBuilder(TranslationService::class)->getMock();
$translationService->expects($this->any())
->method('translateFinisherOption')
->willReturnCallback(function ($formRuntime, $finisherIdentifier, $optionKey, $optionValue) {
return $optionValue;
});
$objectManager = $this->getMockBuilder(ObjectManager::class)->getMock();
$objectManager->expects($this->any())
->method('get')
->with(TranslationService::class)
->willReturn($translationService);
GeneralUtility::setSingletonInstance(ObjectManager::class, $objectManager);
}

public function tearDown()
{
GeneralUtility::resetSingletonInstances($this->singletonInstances);
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ install: clean
lint:
find . -name \*.php -not -path "./vendor/*" -not -path "./.Build/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
.Build/bin/phpcs
.Build/bin/phpstan analyze -c phpstan.dist.neon --level=max Classes/ Tests/ *.php

unitTests:
TYPO3_PATH_WEB=$(TYPO3_WEB_DIR) \
Expand Down
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
"Codappix\\CdxLogging\\": "Classes"
}
},
"autoload-dev": {
"psr-4": {
"Codappix\\CdxLogging\\Tests\\": "Tests"
}
},
"require": {
"php": ">=7.0",
"typo3/cms": "~8.7"
Expand All @@ -26,7 +31,9 @@
"typo3-ci/typo3cms": "^6.2",
"phpunit/phpunit": "~6.2.0",
"typo3/testing-framework": "~1.1.0",
"mikey179/vfsStream": "~1.6.4"
"mikey179/vfsStream": "~1.6.4",
"phpstan/phpstan": "~0.9.2",
"saschaegerer/phpstan-typo3": "~0.9.0@dev"
},
"config": {
"vendor-dir": ".Build/vendor",
Expand Down
7 changes: 7 additions & 0 deletions phpstan.dist.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
includes:
- .Build/vendor/saschaegerer/phpstan-typo3/extension.neon

parameters:
ignoreErrors:
- '#Undefined variable: \$_EXTKEY#'
- '#Codappix\\CdxLogging\\Log\\Writer\\Console::__construct\(\) does not call parent constructor from TYPO3\\CMS\\Core\\Log\\Writer\\AbstractWriter\.#'