Skip to content

Commit 7f2d1c0

Browse files
Merge branch '3.4' into 4.3
* 3.4: #30432 fix an error message fix paths to detect code owners [Validator] Ensure numeric subpaths do not cause errors on PHP 7.4 Remove unused local variables in tests Make sure to collect child forms created on *_SET_DATA events do not render errors for checkboxes twice
2 parents c8b47d8 + 434b23d commit 7f2d1c0

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Tests/ExpressionLanguageTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ public function testCachedParse()
6363
$this->assertSame($savedParsedExpression, $parsedExpression);
6464
}
6565

66+
public function testWrongCacheImplementation()
67+
{
68+
$this->expectException('InvalidArgumentException');
69+
$this->expectExceptionMessage('Cache argument has to implement Psr\Cache\CacheItemPoolInterface.');
70+
$cacheMock = $this->getMockBuilder('Psr\Cache\CacheItemSpoolInterface')->getMock();
71+
new ExpressionLanguage($cacheMock);
72+
}
73+
6674
public function testConstantFunction()
6775
{
6876
$expressionLanguage = new ExpressionLanguage();
@@ -158,7 +166,7 @@ public function testCachingWithDifferentNamesOrder()
158166
$cacheMock = $this->getMockBuilder('Psr\Cache\CacheItemPoolInterface')->getMock();
159167
$cacheItemMock = $this->getMockBuilder('Psr\Cache\CacheItemInterface')->getMock();
160168
$expressionLanguage = new ExpressionLanguage($cacheMock);
161-
$savedParsedExpressions = [];
169+
$savedParsedExpression = null;
162170

163171
$cacheMock
164172
->expects($this->exactly(2))

0 commit comments

Comments
 (0)