Chris@14: , Sebastian Heuer , Sebastian Bergmann Chris@14: * Chris@14: * For the full copyright and license information, please view the LICENSE Chris@14: * file that was distributed with this source code. Chris@14: */ Chris@14: Chris@14: namespace PharIo\Manifest; Chris@14: Chris@14: use PHPUnit\Framework\TestCase; Chris@14: Chris@14: /** Chris@14: * @covers PharIo\Manifest\Url Chris@14: */ Chris@14: class UrlTest extends TestCase { Chris@14: public function testCanBeCreatedForValidUrl() { Chris@14: $this->assertInstanceOf(Url::class, new Url('https://phar.io/')); Chris@14: } Chris@14: Chris@14: public function testCanBeUsedAsString() { Chris@14: $this->assertEquals('https://phar.io/', new Url('https://phar.io/')); Chris@14: } Chris@14: Chris@14: /** Chris@14: * @covers PharIo\Manifest\InvalidUrlException Chris@14: */ Chris@14: public function testCannotBeCreatedForInvalidUrl() { Chris@14: $this->expectException(InvalidUrlException::class); Chris@14: Chris@14: new Url('invalid'); Chris@14: } Chris@14: }