Skip to content

Commit 24a9650

Browse files
committed
Test that it can read __DIR__
1 parent be18ba6 commit 24a9650

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/PHPStan/Rules/Keywords/RequireFileExistsRuleTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,9 @@ public function testFileDoesNotExistUsingConst(): void
7777
],
7878
]);
7979
}
80+
81+
public function testFileExistsUsingDIR(): void
82+
{
83+
$this->analyse([__DIR__ . '/data/file-exists-using-DIR.php'], []);
84+
}
8085
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php declare(strict_types=1);
2+
3+
include __DIR__ . '/include-me-to-prove-you-work.txt';
4+
include_once __DIR__ . '/include-me-to-prove-you-work.txt';
5+
require __DIR__ . '/include-me-to-prove-you-work.txt';
6+
require_once __DIR__ . '/include-me-to-prove-you-work.txt';

0 commit comments

Comments
 (0)