[ticket/634] Add more tests
B3P-634
This commit is contained in:
39
tests/unit/modules/search_test.php
Normal file
39
tests/unit/modules/search_test.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
*
|
||||
* @package testing
|
||||
* @copyright (c) Board3 Group ( www.board3.de )
|
||||
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||
*
|
||||
*/
|
||||
|
||||
namespace board3\portal\modules;
|
||||
|
||||
class phpbb_unit_modules_search_test extends \board3\portal\tests\testframework\test_case
|
||||
{
|
||||
/** @var \board3\portal\tests\mock\template */
|
||||
protected $template;
|
||||
|
||||
/** @var \board3\portal\modules\search */
|
||||
protected $search;
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->template = new \board3\portal\tests\mock\template($this);
|
||||
$this->search = new \board3\portal\modules\search($this->template, '', '');
|
||||
}
|
||||
|
||||
public function test_get_template_side()
|
||||
{
|
||||
$this->assertSame('search_side.html', $this->search->get_template_side(5));
|
||||
}
|
||||
|
||||
public function test_get_template_acp()
|
||||
{
|
||||
$acp_template = $this->search->get_template_acp(5);
|
||||
$this->assertNotEmpty($acp_template);
|
||||
$this->assertEmpty($acp_template['vars']);
|
||||
}
|
||||
}
|
||||
@@ -166,6 +166,7 @@ class phpbb_unit_modules_welcome_test extends \board3\portal\tests\testframework
|
||||
$this->request->overwrite('submit', true, \phpbb\request\request_interface::POST);
|
||||
$this->request->overwrite('welcome_message', '');
|
||||
$this->setExpectedTriggerError(E_USER_WARNING);
|
||||
self::$form_key_valid = true;
|
||||
$this->welcome->update_welcome('foobar', 5);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user