Skip to content

Commit bf4a26f

Browse files
authored
Merge pull request #56 from mglaman/gh22-verify-constant-loaded
Test DRUPAL_TEST_IN_CHILD_SITE is loaded
2 parents 614c9a8 + 580e7f9 commit bf4a26f

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

tests/DrupalIntegrationTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ public function testTestSuiteAutoloading() {
4545
}
4646
}
4747

48+
public function testDrupalTestInChildSiteContant() {
49+
$errors = $this->runAnalyze(__DIR__ . '/fixtures/drupal/modules/phpstan_fixtures/src/DrupalTestInChildSiteContant.php');
50+
$this->assertCount(0, $errors);
51+
}
52+
4853
private function runAnalyze(string $path) {
4954
$rootDir = __DIR__ . '/fixtures/drupal';
5055
$containerFactory = new ContainerFactory($rootDir);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
namespace Drupal\phpstan_fixtures;
4+
5+
class DrupalTestInChildSiteContant {
6+
public function test() {
7+
$test = DRUPAL_TEST_IN_CHILD_SITE;
8+
}
9+
}

0 commit comments

Comments
 (0)