Start work on endpoints - at this point just validating urls

This commit is contained in:
Lewis Dale committed 2023-03-09 16:56:54 +00:00
1 parent f85c48b4a9
commit 15d03799bf
2 files changed
+41

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
<?php declare(strict_types=1);
use Lewisdale\Webmentions\Endpoint;
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\TestWith;
class EndpointTest extends TestCase {
#[TestWith(["https://my.url.com", true])]
#[TestWith(["my.url.com", false])]
public function testValidatesUrls(string $url, bool $expected)
{
$endpoint = new Endpoint();
$this->assertEquals($expected, $endpoint->validateUrl($url), "Expected $url");
}
}
?>