1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
psalm/tests/EndToEnd/DestructiveAutoloaderTest.php
Bruce Weirdan 205fdd197e
Wrap entrypoints into IIFE to protect their variables (#5366)
* Wrap entrypoints into IIFE to protect their variables

Fixes vimeo/psalm#5359

* Add tests for Psalm variable isolation

* Capture environment before registering autoloader
2021-03-11 00:14:22 -05:00

21 lines
478 B
PHP

<?php
namespace Psalm\Tests\EndToEnd;
use PHPUnit\Framework\TestCase;
class DestructiveAutoloaderTest extends TestCase
{
use PsalmRunnerTrait;
public function testSucceedsWithEmptyFile(): void
{
if (\version_compare(\PHP_VERSION, '7.2.0', '<')) {
$this->markTestSkipped('Test case requires PHP 7.2.');
return;
}
$this->runPsalm(['--no-cache'], __DIR__ . '/' . '../fixtures/DestructiveAutoloader/', true);
}
}