mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
first
This commit is contained in:
42
tests/Unit/Actions/ValidatesConfiguration.php
Normal file
42
tests/Unit/Actions/ValidatesConfiguration.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Pest\Actions\ValidatesConfiguration;
|
||||
use Pest\Exceptions\AttributeNotSupportedYet;
|
||||
use Pest\Exceptions\FileOrFolderNotFound;
|
||||
|
||||
it('throws exception when configuration not found', function () {
|
||||
$this->expectException(FileOrFolderNotFound::class);
|
||||
|
||||
ValidatesConfiguration::in([
|
||||
'configuration' => 'foo',
|
||||
]);
|
||||
});
|
||||
|
||||
it('throws exception when `process isolation` is true', function () {
|
||||
$this->expectException(AttributeNotSupportedYet::class);
|
||||
$this->expectExceptionMessage('The PHPUnit attribute `processIsolation` with value `true` is not supported yet.');
|
||||
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
dirname(__DIR__, 2),
|
||||
'Fixtures',
|
||||
'phpunit-in-isolation.xml',
|
||||
]);
|
||||
|
||||
ValidatesConfiguration::in([
|
||||
'configuration' => $filename,
|
||||
]);
|
||||
});
|
||||
|
||||
it('do not throws exception when `process isolation` is false', function () {
|
||||
$filename = implode(DIRECTORY_SEPARATOR, [
|
||||
dirname(__DIR__, 2),
|
||||
'Fixtures',
|
||||
'phpunit-not-in-isolation.xml',
|
||||
]);
|
||||
|
||||
ValidatesConfiguration::in([
|
||||
'configuration' => $filename,
|
||||
]);
|
||||
|
||||
assertTrue(true);
|
||||
});
|
||||
Reference in New Issue
Block a user