-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCancelTest.php
More file actions
72 lines (66 loc) · 1.72 KB
/
CancelTest.php
File metadata and controls
72 lines (66 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* RegistrationEditController Test Case
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author AllCreator <info@allcreator.net>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
App::uses('NetCommonsControllerTestCase', 'NetCommons.TestSuite');
/**
* RegistrationEditController Test Case
*
* @author AllCreator <info@allcreator.net>
* @package NetCommons\Registrations\Test\Case\Controller
* @SuppressWarnings(PHPMD.LongVariable)
*/
class RegistrationEditControllerCancelTest extends NetCommonsControllerTestCase {
/**
* Fixtures
*
* @var array
*/
public $fixtures = array(
'plugin.registrations.registration',
'plugin.registrations.block_setting_for_registration',
'plugin.registrations.registration_page',
'plugin.registrations.registration_question',
'plugin.registrations.registration_choice',
'plugin.registrations.registration_answer_summary',
'plugin.registrations.registration_answer',
'plugin.authorization_keys.authorization_keys',
'plugin.workflow.workflow_comment',
);
/**
* Plugin name
*
* @var array
*/
public $plugin = 'registrations';
/**
* Controller name
*
* @var string
*/
protected $_controller = 'registration_edit';
/**
* testCancel
*
* @return void
*/
public function testCancel() {
//テスト実施
$urlOptions = array(
'action' => 'cancel', 'block_id' => 2, 'frame_id' => 6
);
$url = Hash::merge(array(
'plugin' => $this->plugin,
'controller' => $this->_controller,
), $urlOptions);
$this->_testNcAction($url, array('method' => 'get'), null, 'view');
$result = $this->headers['Location'];
$this->assertNotEmpty($result);
}
}