Passed
Push — master ( 2432f8...918912 )
by Dispositif
02:37
created

HttpUtilTest::provideUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/*
3
 * This file is part of dispositif/wikibot application (@github)
4
 * 2019-2023 © Philippe M./Irønie  <[email protected]>
5
 * For the full copyright and MIT license information, view the license file.
6
 */
7
8
declare(strict_types=1);
9
10
namespace App\Application\Utils;
11
12
use PHPUnit\Framework\TestCase;
13
14
class HttpUtilTest extends TestCase
15
{
16
    public static function provideUrl(): array
17
    {
18
        return [
19
            ['https://fr.wikipedia.fr/wiki/WP:BOT', true],
20
21
        ];
22
    }
23
24
    /**
25
     * @dataProvider provideUrl
26
     */
27
    public function testIsWebUrl(string $url, bool $expected)
28
    {
29
        $this::assertSame($expected, HttpUtil::isHttpURL($url));
30
    }
31
}
32