mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-21 22:36:13 +01:00
Compare commits
2 commits
22598ef789
...
c5d9e1d08e
Author | SHA1 | Date | |
---|---|---|---|
|
c5d9e1d08e | ||
|
a0fa00564c |
4 changed files with 6 additions and 175 deletions
1
.gitattributes
vendored
1
.gitattributes
vendored
|
@ -8,7 +8,6 @@
|
|||
/.npmrc export-ignore
|
||||
/.nvmrc export-ignore
|
||||
/.php-cs-fixer.php export-ignore
|
||||
/.phpstorm.meta.php export-ignore
|
||||
/.prettierrc.js export-ignore
|
||||
/Build/ export-ignore
|
||||
/Configuration/FunctionalTests.xml export-ignore
|
||||
|
|
4
.github/workflows/codecoverage.yml
vendored
4
.github/workflows/codecoverage.yml
vendored
|
@ -63,7 +63,7 @@ jobs:
|
|||
- name: "Run unit tests with coverage"
|
||||
run: composer ci:coverage:unit
|
||||
- name: "Show generated coverage files"
|
||||
run: "ls -lahR .Build/coverage/"
|
||||
run: "ls -lahR build/coverage/"
|
||||
- name: "Run functional tests with coverage"
|
||||
run: |
|
||||
export typo3DatabaseName="$DB_DATABASE";
|
||||
|
@ -72,7 +72,7 @@ jobs:
|
|||
export typo3DatabasePassword="$DB_PASSWORD";
|
||||
composer ci:coverage:functional
|
||||
- name: "Show generated coverage files"
|
||||
run: "ls -lahR .Build/coverage/"
|
||||
run: "ls -lahR build/coverage/"
|
||||
- name: "Merge coverage results"
|
||||
run: composer ci:coverage:merge
|
||||
- name: "Show combined coverage files"
|
||||
|
|
|
@ -1,168 +0,0 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* @see https://www.jetbrains.com/help/phpstorm/ide-advanced-metadata.html
|
||||
*/
|
||||
namespace PHPSTORM_META {
|
||||
|
||||
override(\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(0), type(0));
|
||||
|
||||
// TYPO3 testing framework
|
||||
// The accesible mock will be of type `self` as well as `MockObject` and `AccessibleObjectInterface`.
|
||||
override(
|
||||
\TYPO3\TestingFramework\Core\BaseTestCase::getAccessibleMock(0),
|
||||
map(
|
||||
[
|
||||
'' => '@|\\PHPUnit\\Framework\\MockObject\\MockObject'
|
||||
. '|\\TYPO3\\TestingFramework\\Core\\AccessibleObjectInterface',
|
||||
]
|
||||
)
|
||||
);
|
||||
override(
|
||||
\TYPO3\TestingFramework\Core\BaseTestCase::getAccessibleMockForAbstractClass(0),
|
||||
map(
|
||||
[
|
||||
'' => '@|\\PHPUnit\\Framework\\MockObject\\MockObject'
|
||||
. '|\\TYPO3\TestingFramework\\Core\\AccessibleObjectInterface',
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
// Contexts
|
||||
// @see https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/9.4/Feature-85389-ContextAPIForConsistentDataHandling.html
|
||||
expectedArguments(
|
||||
\TYPO3\CMS\Core\Context\Context::getAspect(),
|
||||
0,
|
||||
'date',
|
||||
'visibility',
|
||||
'backend.user',
|
||||
'frontend.user',
|
||||
'workspace',
|
||||
'language',
|
||||
'typoscript'
|
||||
);
|
||||
|
||||
override(\TYPO3\CMS\Core\Context\Context::getAspect(), map([
|
||||
'date' => \TYPO3\CMS\Core\Context\DateTimeAspect::class,
|
||||
'visibility' => \TYPO3\CMS\Core\Context\VisibilityAspect::class,
|
||||
'backend.user' => \TYPO3\CMS\Core\Context\UserAspect::class,
|
||||
'frontend.user' => \TYPO3\CMS\Core\Context\UserAspect::class,
|
||||
'workspace' => \TYPO3\CMS\Core\Context\WorkspaceAspect::class,
|
||||
'language' => \TYPO3\CMS\Core\Context\LanguageAspect::class,
|
||||
'typoscript' => \TYPO3\CMS\Core\Context\TypoScriptAspect::class,
|
||||
]));
|
||||
|
||||
expectedArguments(
|
||||
\TYPO3\CMS\Core\Context\DateTimeAspect::get(),
|
||||
0,
|
||||
'timestamp',
|
||||
'iso',
|
||||
'timezone',
|
||||
'full',
|
||||
'accessTime'
|
||||
);
|
||||
|
||||
expectedArguments(
|
||||
\TYPO3\CMS\Core\Context\VisibilityAspect::get(),
|
||||
0,
|
||||
'includeHiddenPages',
|
||||
'includeHiddenContent',
|
||||
'includeDeletedRecords'
|
||||
);
|
||||
|
||||
expectedArguments(
|
||||
\TYPO3\CMS\Core\Context\UserAspect::get(),
|
||||
0,
|
||||
'id',
|
||||
'username',
|
||||
'isLoggedIn',
|
||||
'isAdmin',
|
||||
'groupIds',
|
||||
'groupNames'
|
||||
);
|
||||
|
||||
expectedArguments(
|
||||
\TYPO3\CMS\Core\Context\WorkspaceAspect::get(),
|
||||
0,
|
||||
'id',
|
||||
'isLive',
|
||||
'isOffline'
|
||||
);
|
||||
|
||||
expectedArguments(
|
||||
\TYPO3\CMS\Core\Context\LanguageAspect::get(),
|
||||
0,
|
||||
'id',
|
||||
'contentId',
|
||||
'fallbackChain',
|
||||
'overlayType',
|
||||
'legacyLanguageMode',
|
||||
'legacyOverlayType'
|
||||
);
|
||||
|
||||
expectedArguments(
|
||||
\TYPO3\CMS\Core\Context\TypoScriptAspect::get(),
|
||||
0,
|
||||
'forcedTemplateParsing'
|
||||
);
|
||||
|
||||
expectedArguments(
|
||||
\Psr\Http\Message\ServerRequestInterface::getAttribute(),
|
||||
0,
|
||||
'backend.user',
|
||||
'frontend.user',
|
||||
'normalizedParams',
|
||||
'site',
|
||||
'language',
|
||||
'routing',
|
||||
'module',
|
||||
'moduleData'
|
||||
);
|
||||
|
||||
override(\Psr\Http\Message\ServerRequestInterface::getAttribute(), map([
|
||||
'backend.user' => \TYPO3\CMS\Backend\FrontendBackendUserAuthentication::class,
|
||||
'frontend.user' => \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class,
|
||||
'normalizedParams' => \TYPO3\CMS\Core\Http\NormalizedParams::class,
|
||||
'site' => \TYPO3\CMS\Core\Site\Entity\SiteInterface::class,
|
||||
'language' => \TYPO3\CMS\Core\Site\Entity\SiteLanguage::class,
|
||||
'routing' => '\TYPO3\CMS\Core\Routing\SiteRouteResult|\TYPO3\CMS\Core\Routing\PageArguments',
|
||||
'module' => \TYPO3\CMS\Backend\Module\ModuleInterface::class,
|
||||
'moduleData' => \TYPO3\CMS\Backend\Module\ModuleData::class,
|
||||
]));
|
||||
|
||||
expectedArguments(
|
||||
\TYPO3\CMS\Core\Http\ServerRequest::getAttribute(),
|
||||
0,
|
||||
'backend.user',
|
||||
'frontend.user',
|
||||
'normalizedParams',
|
||||
'site',
|
||||
'language',
|
||||
'routing',
|
||||
'module',
|
||||
'moduleData'
|
||||
);
|
||||
|
||||
override(\TYPO3\CMS\Core\Http\ServerRequest::getAttribute(), map([
|
||||
'backend.user' => \TYPO3\CMS\Backend\FrontendBackendUserAuthentication::class,
|
||||
'frontend.user' => \TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class,
|
||||
'normalizedParams' => \TYPO3\CMS\Core\Http\NormalizedParams::class,
|
||||
'site' => \TYPO3\CMS\Core\Site\Entity\SiteInterface::class,
|
||||
'language' => \TYPO3\CMS\Core\Site\Entity\SiteLanguage::class,
|
||||
'routing' => '\TYPO3\CMS\Core\Routing\SiteRouteResult|\TYPO3\CMS\Core\Routing\PageArguments',
|
||||
'module' => \TYPO3\CMS\Backend\Module\ModuleInterface::class,
|
||||
'moduleData' => \TYPO3\CMS\Backend\Module\ModuleData::class,
|
||||
]));
|
||||
|
||||
override(\TYPO3\CMS\Core\Routing\SiteMatcher::matchRequest(), type(
|
||||
\TYPO3\CMS\Core\Routing\SiteRouteResult::class,
|
||||
\TYPO3\CMS\Core\Routing\RouteResultInterface::class
|
||||
)
|
||||
);
|
||||
|
||||
override(\TYPO3\CMS\Core\Routing\PageRouter::matchRequest(), type(
|
||||
\TYPO3\CMS\Core\Routing\PageArguments::class,
|
||||
\TYPO3\CMS\Core\Routing\RouteResultInterface::class
|
||||
));
|
||||
}
|
|
@ -127,15 +127,15 @@
|
|||
"ci:coverage:functional": [
|
||||
"@ci:tests:create-directories",
|
||||
"@coverage:create-directories",
|
||||
"phpunit -c Build/phpunit/FunctionalTests.xml --whitelist Classes --coverage-php=.Build/coverage/functional.cov Tests/Functional"
|
||||
"phpunit -c Build/phpunit/FunctionalTests.xml --whitelist Classes --coverage-php=build/coverage/functional.cov Tests/Functional"
|
||||
],
|
||||
"ci:coverage:merge": [
|
||||
"@coverage:create-directories",
|
||||
"@php tools/phpcov merge --clover=build/logs/clover.xml .Build/coverage/"
|
||||
"@php tools/phpcov merge --clover=build/logs/clover.xml build/coverage/"
|
||||
],
|
||||
"ci:coverage:unit": [
|
||||
"@coverage:create-directories",
|
||||
"phpunit -c Build/phpunit/UnitTests.xml --whitelist Classes --coverage-php=.Build/coverage/unit.cov Tests/Unit"
|
||||
"phpunit -c Build/phpunit/UnitTests.xml --whitelist Classes --coverage-php=build/coverage/unit.cov Tests/Unit"
|
||||
],
|
||||
"ci:json:lint": "find . ! -path '*/.cache/*' ! -path '*/.Build/*' ! -path '*/node_modules/*' -name '*.json' | xargs -r php .Build/bin/jsonlint -q",
|
||||
"ci:php": [
|
||||
|
@ -170,7 +170,7 @@
|
|||
"ci:typoscript:lint": "typoscript-lint -c Configuration/TsLint.yml --ansi -n --fail-on-warnings -vvv Configuration/TypoScript",
|
||||
"ci:xliff:lint": "php Build/xliff/xliff-lint lint:xliff Resources/Private/Language",
|
||||
"ci:yaml:lint": "find . ! -path '*.Build/*' ! -path '*node_modules/*' \\( -name '*.yaml' -o -name '*.yml' \\) | xargs -r php ./.Build/bin/yaml-lint",
|
||||
"coverage:create-directories": "mkdir -p .Build/coverage build/logs",
|
||||
"coverage:create-directories": "mkdir -p build/coverage build/logs",
|
||||
"docs:generate": "docker run --rm --pull always -v $(pwd):/project -it ghcr.io/typo3-documentation/render-guides:latest --config=Documentation",
|
||||
"fix:composer:normalize": "@composer normalize --no-check-lock",
|
||||
"fix:php": [
|
||||
|
|
Loading…
Reference in a new issue