Passed
Push — dev ( 8e8e3b...6bb8f6 )
by Dispositif
03:16 queued 15s
created

ExternHttpClientTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
dl 0
loc 10
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testIsWebUrl() 0 8 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