Files
cachet-docker/tests/Bus/Commands/ComponentGroup/AddComponentGroupCommandTest.php
Laravel Shift 2d2c1d4df3 Adopt PSR-2 coding style
The Laravel framework adopts the PSR-2 coding style in version 5.1.
Laravel apps *should* adopt this coding style as well. Read the
[PSR-2 coding style guide][1] for more details and check out [PHPCS][2]
to use as a code formatting tool.

[1]: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md
[2]: https://github.com/squizlabs/PHP_CodeSniffer
2016-10-19 07:53:09 +00:00

59 lines
1.4 KiB
PHP

<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Tests\Cachet\Bus\Commands\ComponentGroup;
use AltThree\TestBench\CommandTrait;
use CachetHQ\Cachet\Bus\Commands\ComponentGroup\AddComponentGroupCommand;
use CachetHQ\Cachet\Bus\Handlers\Commands\ComponentGroup\AddComponentGroupCommandHandler;
use CachetHQ\Cachet\Models\ComponentGroup;
use CachetHQ\Tests\Cachet\AbstractTestCase;
/**
* This is the add component group command test class.
*
* @author James Brooks <james@alt-three.com>
* @author Graham Campbell <graham@alt-three.com>
*/
class AddComponentGroupCommandTest extends AbstractTestCase
{
use CommandTrait;
protected function getObjectAndParams()
{
$params = [
'name' => 'Test',
'order' => 0,
'collapsed' => 1,
'visible' => ComponentGroup::VISIBLE_AUTHENTICATED,
];
$object = new AddComponentGroupCommand(
$params['name'],
$params['order'],
$params['collapsed'],
$params['visible']
);
return compact('params', 'object');
}
protected function objectHasRules()
{
return true;
}
protected function getHandlerClass()
{
return AddComponentGroupCommandHandler::class;
}
}