*/ class AddMetricCommandTest extends AbstractCommandTestCase { protected function getObjectAndParams() { $params = [ 'name' => 'Coffee', 'suffix' => 'cups', 'description' => 'Cups of coffee consumed', 'default_value' => 0, 'calc_type' => 0, 'display_chart' => 1, 'places' => 0, ]; $object = new AddMetricCommand( $params['name'], $params['suffix'], $params['description'], $params['default_value'], $params['calc_type'], $params['display_chart'], $params['places'] ); return compact('params', 'object'); } protected function objectHasRules() { return true; } protected function getHandlerClass() { return AddMetricCommandHandler::class; } }