コード例 #1
0
ファイル: RoleTest.php プロジェクト: Evyy/cffs-api
 public function setUp()
 {
     parent::setUp();
     $this->id = RoleId::generate();
     $this->title = RoleTitle::fromNative('Asdf Qwerty');
     $this->slug = RoleSlug::fromNative(Str::slug($this->title->toString()));
     $this->role = Role::define($this->id, $this->title, $this->slug);
 }
コード例 #2
0
ファイル: Role.php プロジェクト: Evyy/cffs-api
 /**
  * Set the Role's title
  *
  * @param RoleTitle $title
  * @return void
  */
 private function setTitle(RoleTitle $title)
 {
     $this->title = $title->toString();
 }