Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
petrparolek committed Nov 11, 2024
1 parent f80dd41 commit 18e9167
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-nette": "^1.0",
"webnazakazku/mango-tester-infrastructure": "^0.6",
"webnazakazku/mango-tester-http-mocks": "^0.4"
"webnazakazku/mango-tester-http-mocks": "^0.4",
"dg/bypass-finals": "^1.8"
},
"autoload": {
"classmap": [
Expand Down
5 changes: 4 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ parameters:
- Nette\Http\SessionSection

ignoreErrors:
#- '#Property Nette\\Http\\Request::\$(.*) is not writable.#'
-
message: """
#^Call to deprecated method validateConfig\\(\\) of class Nette\\\\DI\\\\CompilerExtension\\:
use getConfigSchema\\(\\)$#
"""
count: 1
path: src/Bridges/Infrastructure/PresenterTesterExtension.php
-
message: "#^Readonly property Nette\\\\Http\\\\Request\\:\\:\\$rawBodyCallback is assigned outside of its declaring class\\.$#"
count: 1
path: src/PresenterTester.php
9 changes: 5 additions & 4 deletions ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@
"/>
<property name="extensions" type="array" value="php,phpt"/>
</properties>
<!--<exclude name="SlevomatCodingStandard.Functions.DisallowEmptyFunction.EmptyFunction" />
<exclude name="SlevomatCodingStandard.PHP.DisallowReference.DisallowedReturningReference" />
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint" />
<exclude name="SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint" />-->
<exclude name="SlevomatCodingStandard.Functions.DisallowEmptyFunction.EmptyFunction" />
<exclude name="Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps" />
</rule>

<rule ref="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName">
<exclude-pattern>/tests/bootstrap.configurator.php</exclude-pattern>
</rule>


<!-- Exclude folders -->
<exclude-pattern>/tests/tmp</exclude-pattern>
</ruleset>
2 changes: 2 additions & 0 deletions tests/bootstrap.configurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

require __DIR__ . '/../vendor/autoload.php';

DG\BypassFinals::enable();

$configurator = new InfrastructureConfigurator(__DIR__ . '/temp');
$configurator->addConfig(__DIR__ . '/config/infrastructure.neon');
$configurator->setupTester();
Expand Down

0 comments on commit 18e9167

Please sign in to comment.