for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
/*
* This file is part of FlexPHP.
*
* (c) Freddie Gar <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FlexPHP\GRBAC\Tests\Unit;
use FlexPHP\GRBAC\Permission;
use FlexPHP\GRBAC\Tests\TestCase;
final class PermissionTest extends TestCase
{
public function testItCreate(): void
$slug = 'create';
$description = 'Create a new resource';
$permission = new Permission($slug, $description);
$this->assertEquals($slug, $permission->slug());
$this->assertEquals($description, $permission->description());
}
public function testItCreateWithoutDescription(): void
$permission = new Permission($slug);
$this->assertEquals(null, $permission->description());