Skip to content

Commit c118e66

Browse files
committed
test: align feature context overrides
Signed-off-by: Vitor Mattos <vitor@php.rio>
1 parent ced0043 commit c118e66

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

features/bootstrap/FeatureContext.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use Behat\Gherkin\Node\PyStringNode;
44
use Behat\Gherkin\Node\TableNode;
5+
use Behat\Step\Given;
56
use donatj\MockWebServer\MockWebServer;
67
use donatj\MockWebServer\RequestInfo;
78
use donatj\MockWebServer\Response as MockWebServerResponse;
@@ -22,17 +23,17 @@ public function __construct(?array $parameters = []) {
2223

2324
/**
2425
* @inheritDoc
25-
* @psalm-suppress MissingOverrideAttribute
2626
*/
27+
#[\Override]
2728
public function setCurrentUser(string $user): void {
2829
parent::setCurrentUser($user);
2930
Assert::assertEquals($this->currentUser, $user);
3031
}
3132

3233
/**
3334
* @inheritDoc
34-
* @psalm-suppress MissingOverrideAttribute
3535
*/
36+
#[\Override]
3637
public function assureUserExists(string $user): void {
3738
parent::assureUserExists($user);
3839
$lastRequest = $this->getLastREquest();
@@ -57,17 +58,16 @@ private function getLastRequest(): RequestInfo {
5758
* When whe run the test suit of this repository at GitHub Actions, is
5859
* necessary to consider that we haven't Nextcloud installed and mock
5960
* the real path of files.
60-
* @psalm-suppress MissingOverrideAttribute
6161
*/
62+
#[\Override]
6263
public static function findParentDirContainingFile(string $filename): string {
6364
return __DIR__;
6465
}
6566

6667
/**
6768
* @inheritDoc
68-
* @param TableNode|PyStringNode|array|null $body
69-
* @psalm-suppress MissingOverrideAttribute
7069
*/
70+
#[\Override]
7171
public function sendRequest(string $verb, string $url, $body = null, array $headers = [], array $options = []): void {
7272
parent::sendRequest($verb, $url, $body, $headers, $options);
7373
$lastRequest = $this->getLastRequest();
@@ -131,9 +131,7 @@ private function hasNestedPayload(array $payload): bool {
131131
return false;
132132
}
133133

134-
/**
135-
* @Given set the response to:
136-
*/
134+
#[Given('set the response to:')]
137135
public function setTheResponseTo(PyStringNode $response): void {
138136
// Mock response to be equal to body of request
139137
$this->mockServer->setDefaultResponse(new MockWebServerResponse(
@@ -143,8 +141,8 @@ public function setTheResponseTo(PyStringNode $response): void {
143141

144142
/**
145143
* @inheritDoc
146-
* @psalm-suppress MissingOverrideAttribute
147144
*/
145+
#[\Override]
148146
public function theResponseShouldBeAJsonArrayWithTheFollowingMandatoryValues(TableNode $table): void {
149147
$lastRequest = $this->getLastRequest();
150148
$parsedInput = $this->getParsedInputFromRequest($lastRequest);

0 commit comments

Comments
 (0)