|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
class VehicleFixture extends CakeTestFixture { |
|
|
|
|
|
|
4
|
|
|
|
|
5
|
|
|
public $fields = array( |
|
6
|
|
|
'id' => array('type' => 'integer', 'key' => 'primary'), |
|
7
|
|
|
'title' => array('type' => 'string', 'length' => 255, 'null' => false), |
|
8
|
|
|
'state' => array('type' => 'string', 'length' => 255, 'null' => true), |
|
9
|
|
|
'previous_state' => array('type' => 'string', 'length' => 255, 'null' => true), |
|
10
|
|
|
'last_transition' => array('type' => 'string', 'length' => 255, 'null' => true), |
|
11
|
|
|
'last_role' => array('type' => 'string', 'length' => 255, 'null' => true), |
|
12
|
|
|
); |
|
13
|
|
|
|
|
14
|
|
|
public $records = array( |
|
15
|
|
|
array('id' => 1, 'title' => 'Audi Q4', 'state' => 'parked', 'last_transition' => '', 'last_role' => ''), |
|
16
|
|
|
array('id' => 2, 'title' => 'Toyota Yaris', 'state' => 'parked', 'last_transition' => '', 'last_role' => ''), |
|
17
|
|
|
array('id' => 3, 'title' => 'Opel Astra', 'state' => 'idling', 'previous_state' => 'parked', 'last_transition' => 'ignite', 'last_role' => ''), |
|
18
|
|
|
array('id' => 4, 'title' => 'Nissan Leaf', 'state' => 'stalled', 'previous_state' => 'third_gear', 'last_transition' => 'crash', 'last_role' => ''), |
|
19
|
|
|
); |
|
20
|
|
|
} |
|
21
|
|
|
|
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.