Mercurial > hg > isophonics-drupal-site
comparison vendor/theseer/tokenizer/tests/NamespaceUriTest.php @ 14:1fec387a4317
Update Drupal core to 8.5.2 via Composer
author | Chris Cannam |
---|---|
date | Mon, 23 Apr 2018 09:46:53 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1 <?php declare(strict_types = 1); | |
2 namespace TheSeer\Tokenizer; | |
3 | |
4 use PHPUnit\Framework\TestCase; | |
5 | |
6 /** | |
7 * @covers \TheSeer\Tokenizer\NamespaceUri | |
8 */ | |
9 class NamespaceUriTest extends TestCase { | |
10 | |
11 public function testCanBeConstructedWithValidNamespace() { | |
12 $this->assertInstanceOf( | |
13 NamespaceUri::class, | |
14 new NamespaceUri('a:b') | |
15 ); | |
16 } | |
17 | |
18 public function testInvalidNamespaceThrowsException() { | |
19 $this->expectException(NamespaceUriException::class); | |
20 new NamespaceUri('invalid-no-colon'); | |
21 } | |
22 | |
23 public function testStringRepresentationCanBeRetrieved() { | |
24 $this->assertEquals( | |
25 'a:b', | |
26 (new NamespaceUri('a:b'))->asString() | |
27 ); | |
28 } | |
29 } |