Gentics Portal.Node PHP API
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
All
Classes
Namespaces
Functions
Variables
Pages
tests
unit
vote
VoteTest.php
1
<?php
2
/**
3
* Gentics Portal.Node PHP
4
* Author & Copyright (c) by Gentics Software GmbH
5
* sales@gentics.com
6
* http://www.gentics.com
7
* Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8
* You must not use this software without a valid license agreement.
9
*
10
*/
11
class
VoteTest
extends
CDbTestCase
12
{
13
public
$fixtures=array(
14
'answer'
=>
'Answer'
,
15
'question'
=>
'Question'
16
);
17
18
public
function
testApplyVote()
19
{
20
$question_id =
'crf22'
;
21
$voteController =
new
PoolController
(
'Submit'
,
new
VoteModule
(
'vote'
,
''
) );
22
$_POST[
'question'
] = $question_id;
23
$_POST[
'answer'
] =
'1'
;
24
$_POST[
'additionalFields'
] =
'a:2:{s:8:"pageName";s:10:"Page 27243";s:10:"userStatus";s:11:"Status 6600";}'
;
25
26
$this->assertInstanceOf(
'PoolController'
, $voteController);
27
28
$question =
new
Question
();
29
$this->assertNotEmpty($question->model()->findByPk( $question_id ));
30
31
$this->assertEmpty($voteController->actionSubmit());
32
}
33
}
Generated on Thu Jun 20 2013 14:45:15 for Gentics Portal.Node PHP API by
1.8.1.2