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