mirror of
https://github.com/roundcube/roundcubemail.git
synced 2026-03-03 06:44:03 +01:00
29 lines
671 B
PHP
29 lines
671 B
PHP
<?php
|
|
|
|
namespace Roundcube\Tests\Rcmail;
|
|
|
|
use Roundcube\Tests\ActionTestCase;
|
|
|
|
/**
|
|
* Test class to test rcmail_output_json class
|
|
*/
|
|
class OutputJsonTest extends ActionTestCase
|
|
{
|
|
/**
|
|
* Test show_message() method
|
|
*/
|
|
public function test_show_message()
|
|
{
|
|
$rcmail = \rcube::get_instance();
|
|
$output = new \rcmail_output_json();
|
|
|
|
$reflection = new \ReflectionClass($output);
|
|
$commands = $reflection->getProperty('commands');
|
|
$commands->setAccessible(true);
|
|
|
|
$output->show_message('unknown');
|
|
|
|
$this->assertSame([['display_message', 'unknown', 'notice', 0]], $commands->getValue($output));
|
|
}
|
|
}
|