Skip to content

Commit 4644e20

Browse files
Add tests
1 parent ac18dcf commit 4644e20

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php declare(strict_types=1);
2+
/*
3+
* This file is part of PHPUnit.
4+
*
5+
* (c) Sebastian Bergmann <[email protected]>
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\Util\Xml;
11+
12+
use PHPUnit\Framework\TestCase;
13+
use PHPUnit\Runner\Version;
14+
15+
/**
16+
* @small
17+
*
18+
* @covers \PHPUnit\Util\Xml\SchemaFinder
19+
*/
20+
final class SchemaFinderTest extends TestCase
21+
{
22+
public function testFindsExistingSchemaForComposerInstallation(): void
23+
{
24+
$this->assertFileExists((new SchemaFinder)->find((new Version)->series()));
25+
}
26+
27+
public function testDoesNotFindNonExistentSchemaForComposerInstallation(): void
28+
{
29+
$this->expectException(Exception::class);
30+
31+
(new SchemaFinder)->find('0.0');
32+
}
33+
}

0 commit comments

Comments
 (0)