Skip to content

Commit ee8b1b1

Browse files
committed
From PestPHP to PHPUnit
1 parent a63f95e commit ee8b1b1

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 1.0.12 - WIP
4+
- Moving from PestPHP to PHPUnit
5+
36
## 1.0.11 - 2026-01-05
47
- Adding parameters for updating a story
58

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"minimum-stability": "stable",
2323
"require": {
2424
"php": ">=8.3",
25-
"symfony/http-client": "^7.0"
25+
"symfony/http-client": "^7.0|^8.0"
2626
},
2727
"require-dev": {
2828
"phpstan/phpstan": "^2.0",

tests/Feature/RateLimitRetryApiTest.php

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,21 @@ public function testRetryMechanismWithListStories(): void
5555
),
5656
);
5757

58-
$this->assertSame("my-first-post", $storyResponse->data()->get("0.slug"));
58+
$this->assertSame(
59+
"my-first-post",
60+
$storyResponse->data()->get("0.slug"),
61+
);
5962

6063
$storyResponse = $storyApi->page(
6164
queryFilters: new QueryFilters()->add(
6265
new Filter("headline", "like", "Development"),
6366
),
6467
);
6568

66-
$this->assertSame("my-third-post", $storyResponse->data()->get("0.slug"));
69+
$this->assertSame(
70+
"my-third-post",
71+
$storyResponse->data()->get("0.slug"),
72+
);
6773
}
6874

6975
public function testRetryMechanismWithListStories2(): void
@@ -104,7 +110,10 @@ public function testRetryMechanismWithListStories2(): void
104110
),
105111
);
106112

107-
$this->assertSame("my-first-post", $storyResponse->data()->get("0.slug"));
113+
$this->assertSame(
114+
"my-first-post",
115+
$storyResponse->data()->get("0.slug"),
116+
);
108117
$this->assertSame(6, $storyResponse->total());
109118
$this->assertCount(2, $storyResponse->data());
110119

@@ -114,7 +123,10 @@ public function testRetryMechanismWithListStories2(): void
114123
),
115124
);
116125

117-
$this->assertSame("my-third-post", $storyResponse->data()->get("0.slug"));
126+
$this->assertSame(
127+
"my-third-post",
128+
$storyResponse->data()->get("0.slug"),
129+
);
118130
}
119131

120132
public function testRetryMechanismWith500Exception(): void
@@ -144,7 +156,7 @@ public function testRetryMechanismWith500Exception(): void
144156

145157
$client = new RetryableHttpClient(
146158
new MockHttpClient($responses),
147-
new GenericRetryStrategy([429], delayMs: 1000),
159+
new GenericRetryStrategy([429], delayMs: 0),
148160
maxRetries: 2,
149161
);
150162

@@ -177,7 +189,10 @@ public function testRetryMechanismWith500Exception(): void
177189
),
178190
);
179191

180-
$this->assertSame("my-first-post", $storyResponse->data()->get("0.slug"));
192+
$this->assertSame(
193+
"my-first-post",
194+
$storyResponse->data()->get("0.slug"),
195+
);
181196
$this->assertSame(6, $storyResponse->total());
182197
$this->assertSame(2, $storyResponse->perPage());
183198
}

0 commit comments

Comments
 (0)