QwantSearchTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testResultViaCurl() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
use PHPUnit\Framework\TestCase;
6
use rOpenDev\Qwant\QwantSearchViaCurl;
7
8
final class QwantSearchTest extends TestCase
9
{
10
    public function testResultViaCurl(): void
11
    {
12
        $Qwant = new QwantSearchViaCurl('piedweb.com');
13
        $Qwant->setNbrPage(1) // Get Only first Page
14
                 ->setCacheFolder(null)
15
        ;
16
        $results = $Qwant->extractResults();
17
18
        $this->assertEquals('https://piedweb.com/', $results[0]['link']);
19
    }
20
}
21