コード例 #1
0
ファイル: PasswordTest.php プロジェクト: Evyy/cffs-api
 /** @test */
 public function should_create_from_native()
 {
     $password = Password::fromNative('qwertyuiop');
     $this->assertInstanceOf('Cffs\\Domain\\Model\\Identity\\Password', $password);
 }
コード例 #2
0
ファイル: Credentials.php プロジェクト: Evyy/cffs-api
 /**
  * Create a new instance from a native form
  *
  * @param mixed $email
  * @param mixed $password
  * @return ValueObject
  */
 public static function fromNative($email, $password)
 {
     return new Credentials(Email::fromNative($email), Password::fromNative($password));
 }