Added command tests

This commit is contained in:
James Brooks
2015-10-03 16:34:11 +01:00
parent 939bdf0c4e
commit 127d0d0d55
45 changed files with 1163 additions and 25 deletions
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Commands\Component;
class AddComponentCommand
final class AddComponentCommand
{
/**
* The component name.
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\Component;
use CachetHQ\Cachet\Models\Component;
class RemoveComponentCommand
final class RemoveComponentCommand
{
/**
* The component to remove.
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\Component;
use CachetHQ\Cachet\Models\Component;
class UpdateComponentCommand
final class UpdateComponentCommand
{
/**
* The component to update.
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Commands\ComponentGroup;
class AddComponentGroupCommand
final class AddComponentGroupCommand
{
/**
* The component group name.
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\ComponentGroup;
use CachetHQ\Cachet\Models\ComponentGroup;
class RemoveComponentGroupCommand
final class RemoveComponentGroupCommand
{
/**
* The component group to remove.
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\ComponentGroup;
use CachetHQ\Cachet\Models\ComponentGroup;
class UpdateComponentGroupCommand
final class UpdateComponentGroupCommand
{
/**
* The component group.
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\Incident;
use CachetHQ\Cachet\Models\Incident;
class RemoveIncidentCommand
final class RemoveIncidentCommand
{
/**
* The incident to remove.
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Commands\Incident;
class ReportIncidentCommand
final class ReportIncidentCommand
{
/**
* The incident name.
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Commands\Incident;
class ReportMaintenanceCommand
final class ReportMaintenanceCommand
{
/**
* The maintenance name.
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\Incident;
use CachetHQ\Cachet\Models\Incident;
class UpdateIncidentCommand
final class UpdateIncidentCommand
{
/**
* The incident to update.
+1 -1
View File
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Commands\Metric;
class AddMetricCommand
final class AddMetricCommand
{
/**
* The metric name.
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
class AddMetricPointCommand
final class AddMetricPointCommand
{
/**
* The metric to add.
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
class RemoveMetricCommand
final class RemoveMetricCommand
{
/**
* The metric to remove.
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\Metric;
use CachetHQ\Cachet\Models\MetricPoint;
class RemoveMetricPointCommand
final class RemoveMetricPointCommand
{
/**
* The metric point to remove.
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
class UpdateMetricCommand
final class UpdateMetricCommand
{
/**
* The metric.
@@ -14,7 +14,7 @@ namespace CachetHQ\Cachet\Commands\Metric;
use CachetHQ\Cachet\Models\Metric;
use CachetHQ\Cachet\Models\MetricPoint;
class UpdateMetricPointCommand
final class UpdateMetricPointCommand
{
/**
* The metric point.
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Commands\Subscriber;
class SubscribeSubscriberCommand
final class SubscribeSubscriberCommand
{
/**
* The subscriber email.
@@ -23,7 +23,7 @@ class SubscribeSubscriberCommand
/**
* The subscriber auto verification.
*
* @var string
* @var bool
*/
public $verified;
@@ -13,12 +13,12 @@ namespace CachetHQ\Cachet\Commands\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
class UnsubscribeSubscriberCommand
final class UnsubscribeSubscriberCommand
{
/**
* The subscriber to unsubscribe.
*
* @var string
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
@@ -13,12 +13,12 @@ namespace CachetHQ\Cachet\Commands\Subscriber;
use CachetHQ\Cachet\Models\Subscriber;
class VerifySubscriberCommand
final class VerifySubscriberCommand
{
/**
* The subscriber to verify.
*
* @var string
* @var \CachetHQ\Cachet\Models\Subscriber
*/
public $subscriber;
+12 -1
View File
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Commands\User;
class AddTeamMemberCommand
final class AddTeamMemberCommand
{
/**
* The user username.
@@ -41,6 +41,17 @@ class AddTeamMemberCommand
*/
public $level;
/**
* The validation rules.
*
* @var string[]
*/
public $rules = [
'name' => 'required|string',
'password' => 'string',
'level' => 'integer',
];
/**
* Create a new add team member command instance.
*
@@ -11,7 +11,7 @@
namespace CachetHQ\Cachet\Commands\User;
class GenerateApiTokenCommand
final class GenerateApiTokenCommand
{
/**
* The user to generate the token.
+1 -1
View File
@@ -13,7 +13,7 @@ namespace CachetHQ\Cachet\Commands\User;
use CachetHQ\Cachet\Models\User;
class RemoveUserCommand
final class RemoveUserCommand
{
/**
* The user to remove.