Skip to content

Commit c43445d

Browse files
carusogabrielsebastianbergmann
authored andcommitted
Use dedicated assertCount assertions
1 parent 0b52fd1 commit c43445d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/Framework/Constraint/StringContainsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testConstraintStringContainsWhenIgnoreCase(): void
4949
$this->assertTrue($constraint->evaluate('ORYGINAŁ', '', true));
5050
$this->assertTrue($constraint->evaluate('oryginał', '', true));
5151
$this->assertEquals('contains "oryginał"', $constraint->toString());
52-
$this->assertEquals(1, \count($constraint));
52+
$this->assertCount(1, $constraint);
5353

5454
$this->expectException(ExpectationFailedException::class);
5555

@@ -64,7 +64,7 @@ public function testConstraintStringContainsForUtf8StringWhenNotIgnoreCase(): vo
6464
$this->assertFalse($constraint->evaluate('ORYGINAŁ', '', true));
6565
$this->assertTrue($constraint->evaluate('oryginał', '', true));
6666
$this->assertEquals('contains "oryginał"', $constraint->toString());
67-
$this->assertEquals(1, \count($constraint));
67+
$this->assertCount(1, $constraint);
6868

6969
$this->expectException(ExpectationFailedException::class);
7070

tests/Framework/ConstraintTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ public function testConstraintStringNotContainsWhenIgnoreCase(): void
11421142
$this->assertFalse($constraint->evaluate('ORYGINAŁ', '', true));
11431143
$this->assertFalse($constraint->evaluate('oryginał', '', true));
11441144
$this->assertEquals('does not contain "oryginał"', $constraint->toString());
1145-
$this->assertEquals(1, \count($constraint));
1145+
$this->assertCount(1, $constraint);
11461146

11471147
$this->expectException(ExpectationFailedException::class);
11481148

@@ -1159,7 +1159,7 @@ public function testConstraintStringNotContainsForUtf8StringWhenNotIgnoreCase():
11591159
$this->assertTrue($constraint->evaluate('ORYGINAŁ', '', true));
11601160
$this->assertFalse($constraint->evaluate('oryginał', '', true));
11611161
$this->assertEquals('does not contain "oryginał"', $constraint->toString());
1162-
$this->assertEquals(1, \count($constraint));
1162+
$this->assertCount(1, $constraint);
11631163

11641164
$this->expectException(ExpectationFailedException::class);
11651165

0 commit comments

Comments
 (0)