Passed
Branch dev (6bb8f6)
by Dispositif
03:01
created

ExternHttpClientTest::testIsWebUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 5
nc 1
nop 0
dl 0
loc 8
rs 10
c 1
b 0
f 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Domain\Publisher\Tests;
6
7
use App\Application\Http\ExternHttpClient;
8
use PHPUnit\Framework\TestCase;
9
10
class ExternHttpClientTest extends TestCase
11
{
12
    public function testIsWebUrl()
13
    {
14
        $this::assertTrue(ExternHttpClient::isWebURL('https://fr.wikipedia.fr/wiki/WP:BOT'));
15
        $this::assertTrue(ExternHttpClient::isWebURL('http://test.com'));
16
17
        $this::assertFalse(ExternHttpClient::isWebURL('ftp://test.com:88'));
18
        $this::assertfalse(ExternHttpClient::isWebURL('http://test.com bla'));
19
        $this::assertFalse(ExternHttpClient::isWebURL('bla'));
20
    }
21
22
}
23