Code Duplication    Length = 14-14 lines in 2 locations

tests/Integration/UserUnauthenticatedTest.php 2 locations

@@ 84-97 (lines=14) @@
81
      "message" => "The given data was invalid.", "name" => "ValidationException", "status" => 422]);
82
  }
83
84
  public function testInvalidCredentials()
85
  {
86
    $password = $this->newPassword();
87
    /** @var UserInterface $user */
88
    $user = entity(User::class)->create(['originalPassword' => $password]);
89
    /** @noinspection PhpUnhandledExceptionInspection */
90
    $property = self::getProperty(User::class, 'id');
91
    $property->setValue($user, "\x84invalid");
92
    $this->json('POST', '/login', [
93
      'email' => $user->getEmail(),
94
      'password' => $password . "wrong-password"
95
    ])->seeStatusCode(401);
96
    self::assertNull($this->response->headers->get('jwt-token'));
97
  }
98
99
  public function testInvalidEmailValidation()
100
  {
@@ 118-131 (lines=14) @@
115
      "message" => "The given data was invalid.", "name" => "ValidationException", "status" => 422]);
116
  }
117
118
  public function testInvalidId()
119
  {
120
    $password = $this->newPassword();
121
    /** @var UserInterface $user */
122
    $user = entity(User::class)->create(['originalPassword' => $password]);
123
    /** @noinspection PhpUnhandledExceptionInspection */
124
    $property = self::getProperty(User::class, 'id');
125
    $property->setValue($user, "\x84invalid");
126
    $this->json('POST', '/login', [
127
      'email' => $user->getEmail(),
128
      'password' => $password
129
    ])->seeStatusCode(401);
130
    self::assertNull($this->response->headers->get('jwt-token'));
131
  }
132
133
  public function testInvalidLastConfirmedAGBVersion()
134
  {