Skip to content

Commit 97d5f9d

Browse files
committed
fix autoload_files to bootstrapFiles in tests
1 parent ba7418b commit 97d5f9d

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

extension.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ parameters:
22
bootstrapFiles:
33
- drupal-autoloader.php
44
excludes_analyse:
5-
- *.api.php
6-
- */tests/fixtures/*.php
5+
- '*.api.php'
6+
- '*/tests/fixtures/*.php'
77
fileExtensions:
88
- module
99
- theme

tests/fixtures/drupal/modules/phpstan_fixtures/src/TestServicesMappingExtension.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class TestServicesMappingExtension {
88
public function test() {
99
$entity_manager = \Drupal::getContainer()->get('entity.manager');
1010
$doesNotExist = $entity_manager->thisMethodDoesNotExist();
11-
// @todo this should be throwing deprecations...
1211
$definitions = $entity_manager->getDefinitions();
1312
}
1413
}

tests/src/AnalyzerTestBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ protected function runAnalyze(string $path) {
2424
$fileHelper = $container->getByType(FileHelper::class);
2525
assert($fileHelper !== null);
2626

27-
$autoloadFiles = $container->getParameter('autoload_files');
27+
$autoloadFiles = $container->getParameter('bootstrapFiles');
2828
$this->assertEquals([dirname(__DIR__, 2) . '/drupal-autoloader.php'], $autoloadFiles);
2929
if ($autoloadFiles !== null) {
3030
foreach ($autoloadFiles as $autoloadFile) {

tests/src/BootstrapTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private function doDrupalBootstrap()
5555
$fileHelper = $container->getByType(FileHelper::class);
5656
assert($fileHelper !== null);
5757

58-
$autoloadFiles = $container->getParameter('autoload_files');
58+
$autoloadFiles = $container->getParameter('bootstrapFiles');
5959
$this->assertEquals([dirname(__DIR__, 2) . '/drupal-autoloader.php'], $autoloadFiles);
6060
if ($autoloadFiles !== null) {
6161
foreach ($autoloadFiles as $autoloadFile) {

tests/src/DrupalIntegrationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function testServiceMapping() {
7171
instead.'
7272
];
7373
$errors = $this->runAnalyze(__DIR__ . '/../fixtures/drupal/modules/phpstan_fixtures/src/TestServicesMappingExtension.php');
74-
$this->assertCount(3, $errors->getErrors(), var_export($errors->getErrors(), true));
74+
$this->assertCount(3, $errors->getErrors());
7575
$this->assertCount(0, $errors->getInternalErrors());
7676
foreach ($errors->getErrors() as $key => $error) {
7777
$this->assertEquals($errorMessages[$key], $error->getMessage());

0 commit comments

Comments
 (0)