Skip to content

Commit

Permalink
Adjust fixture method names
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHash committed Jul 13, 2020
1 parent 43a47ba commit 54f73dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions tests/Fixture/ChangeUsername.php
Expand Up @@ -12,22 +12,22 @@

final class ChangeUsername implements MessageInterface
{
private UserId $identifier;
private UserId $userId;

private KnownRevision $knownRevision;

private Username $username;

public function __construct(UserId $identifier, KnownRevision $knownRevision, Username $username)
public function __construct(UserId $userId, KnownRevision $knownRevision, Username $username)
{
$this->username = $username;
$this->userId = $userId;
$this->knownRevision = $knownRevision;
$this->identifier = $identifier;
$this->username = $username;
}

public function getIdentifier(): UserId
public function getUserId(): UserId
{
return $this->identifier;
return $this->userId;
}

public function getKnownRevision(): KnownRevision
Expand All @@ -43,7 +43,7 @@ public function getUsername(): Username
public function toNative(): array
{
return [
'identifier' => $this->identifier->toNative(),
'userId' => $this->userId->toNative(),
'knownRevision' => $this->knownRevision->toNative(),
'username' => $this->username->toNative()
];
Expand All @@ -53,7 +53,7 @@ public function toNative(): array
public static function fromNative($state): MessageInterface
{
return new self(
new UserId($state['identifier']),
new UserId($state['userId']),
new KnownRevision((int)$state['knownRevision']),
new Username($state['username'])
);
Expand Down

0 comments on commit 54f73dd

Please sign in to comment.