-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathNetCommonsTreeModel2Fixture.php
More file actions
105 lines (102 loc) · 2.98 KB
/
NetCommonsTreeModel2Fixture.php
File metadata and controls
105 lines (102 loc) · 2.98 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php
/**
* NetCommonsTreeBehaviorModelFixture
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
/**
* NetCommonsTreeBehaviorModelFixture
*
* @author Shohei Nakajima <nakajimashouhei@gmail.com>
* @package NetCommons\NetCommons\Test\Fixture
* @SuppressWarnings(PHPMD.ExcessiveClassLength)
*/
class NetCommonsTreeModel2Fixture extends CakeTestFixture {
/**
* Fields
*
* @var array
*/
public $fields = array(
'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'key' => 'primary'),
'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'tree_name' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8'),
'weight' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'sort_key' => array('type' => 'string', 'null' => false, 'default' => null, 'collate' => 'utf8_general_ci', 'charset' => 'utf8', 'key' => 'index'),
'child_count' => array('type' => 'integer', 'null' => true, 'default' => null, 'unsigned' => false, 'key' => 'index'),
'indexes' => array(
'PRIMARY' => array('column' => 'id', 'unique' => 1),
'parent_id' => array('column' => ['parent_id', 'sort_key', 'id'], 'unique' => 0),
'sort_key' => array('column' => ['sort_key', 'id'], 'unique' => 0),
'weight' => array('column' => ['parent_id', 'weight'], 'unique' => 0),
),
'tableParameters' => array('charset' => 'utf8', 'collate' => 'utf8_unicode_ci', 'engine' => 'InnoDB')
);
/**
* Records
*
* @var array
*/
public $records = [
[
'id' => '4001',
'parent_id' => null,
'tree_name' => 'Category 6',
'weight' => '1',
'sort_key' => '~00000001',
'child_count' => '4'
],
[
'id' => '5001',
'parent_id' => '4001',
'tree_name' => 'Category 6-1000',
'weight' => '1',
'sort_key' => '~00000001-00000001',
'child_count' => '0'
],
[
'id' => '5002',
'parent_id' => '4001',
'tree_name' => 'Category 6-1001',
'weight' => '2',
'sort_key' => '~00000001-00000002',
'child_count' => '1'
],
[
'id' => '5003',
'parent_id' => '5002',
'tree_name' => 'Category 6-1001-1',
'weight' => '1',
'sort_key' => '~00000001-00000002-00000001',
'child_count' => '0'
],
[
'id' => '5004',
'parent_id' => '4001',
'tree_name' => 'Category 6-1002',
'weight' => '3',
'sort_key' => '~00000001-00000003',
'child_count' => '0'
],
[
'id' => '4002',
'parent_id' => null,
'tree_name' => 'Category 7',
'weight' => '1',
'sort_key' => '~00000002',
'child_count' => '1'
],
[
'id' => '5005',
'parent_id' => '4002',
'tree_name' => 'Category 7-1',
'weight' => '1',
'sort_key' => '~00000002-00000001',
'child_count' => '0'
],
];
}