mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-22 15:56:58 +01:00
* Fix "method_argument_space" * Fix "control_structure_continuation_position" * Fix "new_with_parentheses" * Fix "blank_line_before_statement" * Fix "visibility_required" * Fix some "array_indentation" * Fix some "array_indentation" - unify all "rcube::raise_error" calls * rm useless eslint ignores and add rules counts * sort eslint ignores * fix eslint ignores grammar * Revert "Fix "blank_line_before_statement"" * fix CS 3.46.0
29 lines
794 B
PHP
29 lines
794 B
PHP
<?php
|
|
|
|
/**
|
|
* Test class to test rcmail_html_page class
|
|
*/
|
|
class Rcmail_RcmailHtmlPage extends ActionTestCase
|
|
{
|
|
/**
|
|
* Test html page output
|
|
*/
|
|
public function test_html_output()
|
|
{
|
|
$page = new rcmail_html_page();
|
|
|
|
$page->register_inline_warning('Test', 'Button', 'http://url');
|
|
|
|
ob_start();
|
|
$page->write();
|
|
$output = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
$expected_body = '<body><div class="rcmail-inline-message rcmail-inline-warning"><span>Test</span>'
|
|
. '<p class="rcmail-inline-buttons"><button onclick="location.href = \'http://url\'">Button</button></p></div>';
|
|
|
|
$this->assertTrue(strpos($output, '<html') === 0);
|
|
$this->assertTrue(strpos($output, $expected_body) !== false);
|
|
}
|
|
}
|