Merge pull request #193 from marc1706/split/functional_test
[split/functional_test] Split poll tests into seperate functional test file
This commit is contained in:
@@ -24,18 +24,4 @@ class phpbb_functional_portal_no_error_test extends \board3\portal\tests\testfra
|
|||||||
{
|
{
|
||||||
$crawler = self::request('GET', 'app.php?portal');
|
$crawler = self::request('GET', 'app.php?portal');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_with_poll()
|
|
||||||
{
|
|
||||||
// Create topic with poll
|
|
||||||
$data = $this->create_topic(2, 'Portal-poll', 'This is a poll for the portal', array(
|
|
||||||
'poll_title' => 'Is this a poll?',
|
|
||||||
'poll_option_text' => "Yes\nNo\nMaybe",
|
|
||||||
));
|
|
||||||
|
|
||||||
if (isset($data))
|
|
||||||
{
|
|
||||||
$crawler = self::request('GET', 'app.php?portal');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
36
tests/functional/portal_vote_poll_test.php
Normal file
36
tests/functional/portal_vote_poll_test.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @package testing
|
||||||
|
* @copyright (c) 2013 Board3 Group
|
||||||
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @group functional
|
||||||
|
*/
|
||||||
|
class phpbb_functional_portal_vote_poll_test extends \board3\portal\tests\testframework\functional_test_case
|
||||||
|
{
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
$this->login();
|
||||||
|
$this->admin_login();
|
||||||
|
$this->enable_board3_portal_ext();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_with_poll()
|
||||||
|
{
|
||||||
|
// Create topic with poll
|
||||||
|
$data = $this->create_topic(2, 'Portal-poll', 'This is a poll for the portal', array(
|
||||||
|
'poll_title' => 'Is this a poll?',
|
||||||
|
'poll_option_text' => "Yes\nNo\nMaybe",
|
||||||
|
));
|
||||||
|
|
||||||
|
if (isset($data))
|
||||||
|
{
|
||||||
|
$crawler = self::request('GET', 'app.php?portal');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user