Refactored the way we store metrics
This commit is contained in:
committed by
James Brooks
parent
3730ca8811
commit
f9bc46b460
@@ -29,14 +29,15 @@ class AddMetricCommandTest extends AbstractTestCase
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = [
|
||||
'name' => 'Coffee',
|
||||
'suffix' => 'cups',
|
||||
'description' => 'Cups of coffee consumed',
|
||||
'default_value' => 0,
|
||||
'calc_type' => 0,
|
||||
'display_chart' => 1,
|
||||
'places' => 0,
|
||||
'default_view' => 0,
|
||||
'name' => 'Coffee',
|
||||
'suffix' => 'cups',
|
||||
'description' => 'Cups of coffee consumed',
|
||||
'default_value' => 0,
|
||||
'calc_type' => 0,
|
||||
'display_chart' => 1,
|
||||
'places' => 0,
|
||||
'default_view' => 0,
|
||||
'threshold' => 0,
|
||||
];
|
||||
|
||||
$object = new AddMetricCommand(
|
||||
@@ -47,7 +48,8 @@ class AddMetricCommandTest extends AbstractTestCase
|
||||
$params['calc_type'],
|
||||
$params['display_chart'],
|
||||
$params['places'],
|
||||
$params['default_view']
|
||||
$params['default_view'],
|
||||
$params['threshold']
|
||||
);
|
||||
|
||||
return compact('params', 'object');
|
||||
|
||||
@@ -39,6 +39,7 @@ class UpdateMetricCommandTest extends AbstractTestCase
|
||||
'display_chart' => 1,
|
||||
'places' => 0,
|
||||
'default_view' => 0,
|
||||
'threshold' => 0,
|
||||
];
|
||||
|
||||
$object = new UpdateMetricCommand(
|
||||
@@ -50,7 +51,8 @@ class UpdateMetricCommandTest extends AbstractTestCase
|
||||
$params['calc_type'],
|
||||
$params['display_chart'],
|
||||
$params['places'],
|
||||
$params['default_view']
|
||||
$params['default_view'],
|
||||
$params['threshold']
|
||||
);
|
||||
|
||||
return compact('params', 'object');
|
||||
|
||||
Reference in New Issue
Block a user