Files
roundcubemail/plugins/help/tests/Help.php
Michael Voříšek 54f4aa33f9 Fix CS - imports (#9316)
* fix Tests\Browser\TestCase imports

* fix remaining imports

* fix PHPUnit\Framework\TestCase imports

* import GuzzleHttp\Client

* fix remaining

* "php_unit_method_casing" is not todo

* fix "single_line_comment_spacing"

* fix 2nd commit done using older fixer
2024-01-21 19:13:31 +01:00

40 lines
1023 B
PHP

<?php
use PHPUnit\Framework\TestCase;
class Help_Plugin extends TestCase
{
public static function setUpBeforeClass(): void
{
include_once __DIR__ . '/../help.php';
}
/**
* Plugin object construction test
*/
public function test_constructor()
{
$rcube = rcube::get_instance();
$plugin = new help($rcube->plugins);
$this->assertInstanceOf('help', $plugin);
$this->assertInstanceOf('rcube_plugin', $plugin);
}
/**
* Test help_metadata()
*/
public function test_help_metadata()
{
$rcube = rcube::get_instance();
$plugin = new help($rcube->plugins);
$result = $plugin->help_metadata();
$this->assertCount(3, $result);
$this->assertMatchesRegularExpression('|\?_task=settings&_action=about&_framed=1$|', $result['about']);
$this->assertSame('self', $result['license']);
$this->assertSame('http://docs.roundcube.net/doc/help/1.1/en_US/', $result['index']);
}
}