Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| phpbb_textformatter_s9e_link_helper_test | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| test_does_not_override_autoimage | |
100.00% |
8 / 8 |
|
100.00% |
1 / 1 |
1 | |||
| 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 | class phpbb_textformatter_s9e_link_helper_test extends phpbb_test_case |
| 15 | { |
| 16 | public function test_does_not_override_autoimage() |
| 17 | { |
| 18 | $container = $this->get_test_case_helpers()->set_s9e_services(); |
| 19 | $configurator = $container->get('text_formatter.s9e.factory')->get_configurator(); |
| 20 | |
| 21 | $configurator->Autoimage; |
| 22 | extract($configurator->finalize()); |
| 23 | |
| 24 | $original = 'http://localhost/path_to_long_image_filename_0123456789.png'; |
| 25 | $expected = '<r> |
| 26 | <URL url="http://localhost/path_to_long_image_filename_0123456789.png"> |
| 27 | <IMG src="http://localhost/path_to_long_image_filename_0123456789.png"> |
| 28 | <LINK_TEXT text="http://localhost/path_to_long_image_fil ... 456789.png">http://localhost/path_to_long_image_filename_0123456789.png</LINK_TEXT> |
| 29 | </IMG> |
| 30 | </URL> |
| 31 | </r>'; |
| 32 | |
| 33 | $this->assertXmlStringEqualsXmlString($expected, $parser->parse($original)); |
| 34 | } |
| 35 | } |