Skip to content
Permalink
Browse files

Add basic handler tests

  • Loading branch information...
flack committed Oct 8, 2019
1 parent 4640626 commit ee0f974ab8457d0fb484ffa4a22ab229342fef39
@@ -0,0 +1,23 @@
<?php
/**
* @package openpsa.test
* @author CONTENT CONTROL http://www.contentcontrol-berlin.de/
* @copyright CONTENT CONTROL http://www.contentcontrol-berlin.de/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
*/
/**
* OpenPSA testcase
*
* @package openpsa.test
*/
class midcom_core_nullcomponent_handler_indexTest extends openpsa_testcase
{
public function testHandler_index()
{
$topic = new midcom_db_topic;
$topic->component = 'midcom.core.nullcomponent';
$data = $this->run_handler($topic);
$this->assertEquals('index', $data['handler_id']);
}
}
@@ -0,0 +1,25 @@
<?php
/**
* @package openpsa.test
* @author CONTENT CONTROL http://www.contentcontrol-berlin.de/
* @copyright CONTENT CONTROL http://www.contentcontrol-berlin.de/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License
*/
/**
* OpenPSA testcase
*
* @package openpsa.test
*/
class midcom_core_nullcomponent_handler_wizardTest extends openpsa_testcase
{
public function testHandler_index()
{
midcom::get()->auth->request_sudo('midcom.core');
$topic = new midcom_db_topic;
$topic->component = 'midcom.core.nullcomponent';
$data = $this->run_handler($topic, ['wizard']);
$this->assertEquals('wizard', $data['handler_id']);
midcom::get()->auth->drop_sudo();
}
}

0 comments on commit ee0f974

Please sign in to comment.
You can’t perform that action at this time.