Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 7 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| phpbb_functional_jumpbox_test | |
0.00% |
0 / 7 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| test_jumpbox | |
0.00% |
0 / 6 |
|
0.00% |
0 / 1 |
2 | |||
| check_valid_jump | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | /** |
| 3 | * |
| 4 | * This file is part of the phpBB Forum Software package. |
| 5 | * |
| 6 | * @copyright (c) phpBB Limited <https://www.phpbb.com> |
| 7 | * @license GNU General Public License, version 2 (GPL-2.0) |
| 8 | * |
| 9 | * For full copyright and license information, please see |
| 10 | * the docs/CREDITS.txt file. |
| 11 | * |
| 12 | */ |
| 13 | |
| 14 | /** |
| 15 | * @group functional |
| 16 | */ |
| 17 | class phpbb_functional_jumpbox_test extends phpbb_functional_test_case |
| 18 | { |
| 19 | protected $crawler; |
| 20 | |
| 21 | public function test_jumpbox() |
| 22 | { |
| 23 | $this->login(); |
| 24 | |
| 25 | $this->crawler = $this->get_quickmod_page(1, 'MERGE_TOPIC'); |
| 26 | $this->check_valid_jump('Your first forum'); |
| 27 | |
| 28 | $link = $this->crawler->filter('#jumpbox')->selectLink('Your first category')->link()->getUri(); |
| 29 | $this->crawler = self::request('GET', substr($link, strpos($link, 'mcp.'))); |
| 30 | $this->check_valid_jump('Your first category'); |
| 31 | } |
| 32 | |
| 33 | protected function check_valid_jump($forum) |
| 34 | { |
| 35 | $this->assertStringContainsString($this->lang('FORUM') . ": $forum", $this->crawler->filter('#cp-main h2')->text(), $this->crawler->text()); |
| 36 | } |
| 37 | } |