コード例 #1
0
ファイル: RoleStub.php プロジェクト: Evyy/cffs-api
 public static function create()
 {
     $faker = Factory::create();
     $identifier = RoleId::generate();
     $title = RoleTitle::fromNative($faker->word);
     $slug = RoleSlug::fromNative(Str::slug($title));
     return Role::define($identifier, $title, $slug);
 }
コード例 #2
0
ファイル: RoleTest.php プロジェクト: Evyy/cffs-api
 /** @test */
 public function should_require_slug()
 {
     $this->setExpectedException('TypeError');
     $role = Role::define($this->id, $this->title, null);
 }