Skip to content

Commit 5374415

Browse files
authored
Merge pull request #30 from Bee-Lab/deprecation
🗑️ deprecate assertSelectorCounts
2 parents ec626b3 + 346e841 commit 5374415

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: PHPStan
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414
- name: PHPStan
1515
uses: docker://oskarstark/phpstan-ga
1616
env:
@@ -22,9 +22,11 @@ jobs:
2222
name: PHP-CS-Fixer
2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2626
- name: Fix CS
2727
uses: docker://oskarstark/php-cs-fixer-ga
28+
with:
29+
args: --diff --dry-run
2830
tests:
2931
runs-on: ubuntu-24.04
3032
strategy:

src/Test/WebTestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,9 @@ protected static function submitFormByData(
249249

250250
protected static function assertSelectorCounts(int $number, string $selector, string $message = ''): void
251251
{
252-
self::assertCount($number, self::$client->getCrawler()->filter($selector), $message);
252+
@\trigger_error(\sprintf('%s is deprecated since version %s, use self::assertSelectorCount instead.', __METHOD__, '7.1'), \E_USER_DEPRECATED);
253+
254+
self::assertSelectorCount($number, $selector, $message);
253255
}
254256

255257
protected static function tickCheckboxes(Form $form, array $checkboxValues = []): void

tests/Test/WebTestCaseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function (string $parameter): string {
7474
$method = new \ReflectionMethod(self::$mock, 'saveOutput');
7575
$method->invoke(self::$mock, false);
7676

77-
/** @var \org\bovigo\vfs\vfsStreamFile $file */
77+
/** @var \org\bovigo\vfs\vfsStreamFile|null $file */
7878
$file = $vfs->getChild('public/test.html');
7979
self::assertNotNull($file);
8080
self::assertEquals('Response content', $file->getContent());

0 commit comments

Comments
 (0)