Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit 3fa6401

Browse files
committed
Test that it can read consts
1 parent 39c1abb commit 3fa6401

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

tests/MainTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class MainTest extends TestCase
1010
{
1111
public function testHappyPath(): void
1212
{
13-
$expectedTotalErrors = 12;
13+
$expectedTotalErrors = 16;
1414
$expectedErrorsPerFile = [
1515
'file_exists_but_path_is_relative.php' => [
1616
'errors' => 4,
@@ -24,6 +24,10 @@ public function testHappyPath(): void
2424
'errors' => 4,
2525
'lines' => [7, 8, 9, 10]
2626
],
27+
'included_file_does_not_exist_using_const.php' => [
28+
'errors' => 4,
29+
'lines' => [5, 6, 7, 8]
30+
],
2731
];
2832
$errorStartsWith = 'Included or required file "';
2933
$errorEndsWith = '" does not exist.';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
include __DIR__ . '/' . FILE_EXISTS;
6+
include_once __DIR__ . '/' . FILE_EXISTS;
7+
require __DIR__ . '/' . FILE_EXISTS;
8+
require_once __DIR__ . '/' . FILE_EXISTS;
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
include __DIR__ . '/' . FILE_DOES_NOT_EXIST;
6+
include_once __DIR__ . '/' . FILE_DOES_NOT_EXIST;
7+
require __DIR__ . '/' . FILE_DOES_NOT_EXIST;
8+
require_once __DIR__ . '/' . FILE_DOES_NOT_EXIST;

0 commit comments

Comments
 (0)