Refactored the way we store metrics

This commit is contained in:
James Brooks
2016-03-02 12:09:57 +00:00
committed by James Brooks
parent 3730ca8811
commit f9bc46b460
25 changed files with 329 additions and 104 deletions

View File

@@ -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');

View File

@@ -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');