Skip to content

Commit 402d8b7

Browse files
committed
minor symfony#57693 [ExpressionLanguage] Use assertSame() instead of assertEquals() (alexandre-daubois)
This PR was merged into the 7.2 branch. Discussion ---------- [ExpressionLanguage] Use `assertSame()` instead of `assertEquals()` | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Like symfony#57690 but rebased on 7.2 Commits ------- 2bc65c7 [ExpressionLanguage] Use `assertSame()` instead of `assertEquals()`
2 parents 0df7c3b + 2bc65c7 commit 402d8b7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Symfony/Component/ExpressionLanguage/Tests/ExpressionLanguageTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public function testCachedParse()
7777
public function testBasicPhpFunction($expression, $expected, $compiled)
7878
{
7979
$expressionLanguage = new ExpressionLanguage();
80-
$this->assertEquals($expected, $expressionLanguage->evaluate($expression));
81-
$this->assertEquals($compiled, $expressionLanguage->compile($expression));
80+
$this->assertSame($expected, $expressionLanguage->evaluate($expression));
81+
$this->assertSame($compiled, $expressionLanguage->compile($expression));
8282
}
8383

8484
public static function basicPhpFunctionProvider()
@@ -143,14 +143,14 @@ public function testCompiledEnumFunctionWithBackedEnum()
143143
public function testProviders(iterable $providers)
144144
{
145145
$expressionLanguage = new ExpressionLanguage(null, $providers);
146-
$this->assertEquals('foo', $expressionLanguage->evaluate('identity("foo")'));
147-
$this->assertEquals('"foo"', $expressionLanguage->compile('identity("foo")'));
148-
$this->assertEquals('FOO', $expressionLanguage->evaluate('strtoupper("foo")'));
149-
$this->assertEquals('\strtoupper("foo")', $expressionLanguage->compile('strtoupper("foo")'));
150-
$this->assertEquals('foo', $expressionLanguage->evaluate('strtolower("FOO")'));
151-
$this->assertEquals('\strtolower("FOO")', $expressionLanguage->compile('strtolower("FOO")'));
146+
$this->assertSame('foo', $expressionLanguage->evaluate('identity("foo")'));
147+
$this->assertSame('"foo"', $expressionLanguage->compile('identity("foo")'));
148+
$this->assertSame('FOO', $expressionLanguage->evaluate('strtoupper("foo")'));
149+
$this->assertSame('\strtoupper("foo")', $expressionLanguage->compile('strtoupper("foo")'));
150+
$this->assertSame('foo', $expressionLanguage->evaluate('strtolower("FOO")'));
151+
$this->assertSame('\strtolower("FOO")', $expressionLanguage->compile('strtolower("FOO")'));
152152
$this->assertTrue($expressionLanguage->evaluate('fn_namespaced()'));
153-
$this->assertEquals('\Symfony\Component\ExpressionLanguage\Tests\Fixtures\fn_namespaced()', $expressionLanguage->compile('fn_namespaced()'));
153+
$this->assertSame('\Symfony\Component\ExpressionLanguage\Tests\Fixtures\fn_namespaced()', $expressionLanguage->compile('fn_namespaced()'));
154154
}
155155

156156
public static function providerTestCases(): iterable
@@ -167,7 +167,7 @@ public static function providerTestCases(): iterable
167167
public function testShortCircuitOperatorsEvaluate($expression, array $values, $expected)
168168
{
169169
$expressionLanguage = new ExpressionLanguage();
170-
$this->assertEquals($expected, $expressionLanguage->evaluate($expression, $values));
170+
$this->assertSame($expected, $expressionLanguage->evaluate($expression, $values));
171171
}
172172

173173
/**

0 commit comments

Comments
 (0)