Files
roundcubemail/plugins/help/tests/HelpTest.php
Michael Voříšek 1e360999b2 Use composer autoloader for bundled plugins testing (#9412)
* use fixed "roundcube/plugin-installer"

* Use composer autoloader for plugins testing

* cherrypick remaining from 9241 related with testing

* minor legacy autoload improvements
2024-04-11 18:28:46 +02:00

35 lines
909 B
PHP

<?php
use PHPUnit\Framework\TestCase;
class Help_Plugin extends TestCase
{
/**
* 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']);
}
}