Skip to content

Commit feaf630

Browse files
Merge branch '10.0'
2 parents 55cc122 + e8283b7 commit feaf630

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

tests/_files/RequirementsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,10 @@ public function testEleven(): void
102102
* @requires PHP 99-dev
103103
* @requires PHPUnit 99-dev
104104
* @requires OS DOESNOTEXIST
105+
* @requires OSFAMILY DOESNOTEXIST
105106
* @requires function testFuncOne
106107
* @requires function testFunc2
108+
* @requires function DoesNotExist::doesNotExist
107109
* @requires extension testExtOne
108110
* @requires extension testExt2
109111
* @requires extension testExtThree 2.0
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <sebastian@phpunit.de>
6+
*
7+
* For the full copyright and license information, please view the LICENSE
8+
* file that was distributed with this source code.
9+
*/
10+
namespace PHPUnit\Metadata;
11+
12+
use PHPUnit\Framework\Attributes\CoversClass;
13+
use PHPUnit\Framework\Attributes\Small;
14+
use PHPUnit\Framework\TestCase;
15+
16+
#[CoversClass(AnnotationsAreNotSupportedForInternalClassesException::class)]
17+
#[Small]
18+
final class AnnotationsAreNotSupportedForInternalClassesExceptionTest extends TestCase
19+
{
20+
public function testConstructsMessageCorrectly(): void
21+
{
22+
$this->assertSame(
23+
'Annotations can only be parsed for user-defined classes, trying to parse annotations for class "the-class"',
24+
(new AnnotationsAreNotSupportedForInternalClassesException('the-class'))->getMessage()
25+
);
26+
}
27+
}

tests/unit/Metadata/Facade/RequirementsFacadeTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ public static function missingRequirementsProvider(): array
4545
'PHP extension testExtThree >= 2.0 is required.',
4646
'PHPUnit >= 99-dev is required.',
4747
'Operating system DOESNOTEXIST is required.',
48+
'Operating system DOESNOTEXIST is required.',
4849
'Function testFuncOne() is required.',
4950
'Function testFunc2() is required.',
51+
'Method DoesNotExist::doesNotExist() is required.',
5052
'Setting "not_a_setting" is required to be "Off".',
5153
]],
5254
['testPHPVersionOperatorLessThan', [

0 commit comments

Comments
 (0)