Skip to content

Commit 2379acf

Browse files
committed
feat: allow PHPUnit 10-11
1 parent 78771ba commit 2379acf

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
tools: composer:v2
3434

3535
- name: Checkout code
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@v5
3737

3838
- name: Download dependencies
3939
run: |

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: PHP-CS-Fixer
1919
uses: docker://oskarstark/php-cs-fixer-ga:2.16.4

src/HttpBaseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ protected function assertResponse(ResponseInterface $response, array $options =
223223
if (null === $options['body']) {
224224
$this->assertEmpty($response->getBody()->__toString());
225225
} else {
226-
$this->assertStringContainsString($options['body'], $response->getBody()->__toString());
226+
$this->assertStringContainsStringCompatible($options['body'], $response->getBody()->__toString());
227227
}
228228
}
229229

src/HttpFeatureTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function testEncoding()
143143
$response = $this->createClient()->sendRequest($request);
144144

145145
$this->assertSame(200, $response->getStatusCode());
146-
$this->assertStringContainsString('', $response->getBody()->__toString());
146+
$this->assertStringContainsStringCompatible('', $response->getBody()->__toString());
147147
}
148148

149149
/**
@@ -159,7 +159,7 @@ public function testGzip()
159159
$response = $this->createClient()->sendRequest($request);
160160

161161
$this->assertSame(200, $response->getStatusCode());
162-
$this->assertStringContainsString('gzip', $response->getBody()->__toString());
162+
$this->assertStringContainsStringCompatible('gzip', $response->getBody()->__toString());
163163
}
164164

165165
/**
@@ -175,7 +175,7 @@ public function testDeflate()
175175
$response = $this->createClient()->sendRequest($request);
176176

177177
$this->assertSame(200, $response->getStatusCode());
178-
$this->assertStringContainsString('deflate', $response->getBody()->__toString());
178+
$this->assertStringContainsStringCompatible('deflate', $response->getBody()->__toString());
179179
}
180180

181181
/**

src/PhpUnitBackwardCompatibleTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
trait PhpUnitBackwardCompatibleTrait
88
{
9-
public static function assertStringContainsString(string $needle, string $haystack, string $message = ''): void
9+
public static function assertStringContainsStringCompatible(string $needle, string $haystack, string $message = ''): void
1010
{
1111
// For supporting both phpunit 7 and 8 without display any deprecation.
1212
if (method_exists(TestCase::class, 'assertStringContainsString')) {

0 commit comments

Comments
 (0)