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

Commit 5b661ac

Browse files
committed
Test that it cannot read class method
1 parent 8a6e445 commit 5b661ac

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

tests/ClassThatContainsMethod.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Tests;
6+
7+
class ClassThatContainsMethod
8+
{
9+
public function getFileThatDoesNotExist(): string
10+
{
11+
return 'a_file_that_does_not_exist.txt';
12+
}
13+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use Tests\ClassThatContainsMethod;
6+
7+
include __DIR__ . '/' . (new ClassThatContainsMethod())->getFileThatDoesNotExist();
8+
include_once __DIR__ . '/' . (new ClassThatContainsMethod())->getFileThatDoesNotExist();
9+
require __DIR__ . '/' . (new ClassThatContainsMethod())->getFileThatDoesNotExist();
10+
require_once __DIR__ . '/' . (new ClassThatContainsMethod())->getFileThatDoesNotExist();

0 commit comments

Comments
 (0)