Conditions | 1 |
Paths | 1 |
Total Lines | 27 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 19 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | 2 | public function load(ObjectManager $manager) |
|
13 | { |
||
14 | 2 | $variable = new Variable(); |
|
15 | |||
16 | 2 | $variable->setName('temperature'); |
|
17 | 2 | $variable->setDescription('test temperature metric'); |
|
18 | 2 | $variable->setSource('internal'); |
|
19 | 2 | $variable->setParser('Simple'); |
|
20 | 2 | $variable->setValue('20'); |
|
21 | |||
22 | 2 | $manager->persist($variable); |
|
23 | |||
24 | 2 | $widget = new Widget(); |
|
25 | |||
26 | 2 | $widget->setName('temperature'); |
|
27 | 2 | $widget->setHeight(2); |
|
28 | 2 | $widget->setType('value'); |
|
29 | 2 | $widget->setWidth(2); |
|
30 | 2 | $widget->setX(0); |
|
31 | 2 | $widget->setY(0); |
|
32 | 2 | $widget->setVariable($variable); |
|
33 | |||
34 | 2 | $manager->persist($widget); |
|
35 | |||
36 | |||
37 | 2 | $manager->flush(); |
|
38 | 2 | } |
|
39 | } |
||
40 |