@@ 26-34 (lines=9) @@ | ||
23 | } |
|
24 | ||
25 | /** @test */ |
|
26 | public function user_agents_are_bots() |
|
27 | { |
|
28 | $lines = file(__DIR__.'/crawlers.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); |
|
29 | ||
30 | foreach ($lines as $line) { |
|
31 | $test = $this->CrawlerDetect->isCrawler($line); |
|
32 | $this->assertTrue($test); |
|
33 | } |
|
34 | } |
|
35 | ||
36 | /** @test */ |
|
37 | public function user_agents_are_devices() |
|
@@ 37-45 (lines=9) @@ | ||
34 | } |
|
35 | ||
36 | /** @test */ |
|
37 | public function user_agents_are_devices() |
|
38 | { |
|
39 | $lines = file(__DIR__.'/devices.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); |
|
40 | ||
41 | foreach ($lines as $line) { |
|
42 | $test = $this->CrawlerDetect->isCrawler($line); |
|
43 | $this->assertFalse($test); |
|
44 | } |
|
45 | } |
|
46 | ||
47 | /** @test */ |
|
48 | public function it_returns_correct_matched_bot_name() |