Skip to content

Commit

Permalink
TASK: Remove unused test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Leon Dies authored and klfman committed May 19, 2022
1 parent 3815d9b commit e82ea5a
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions Tests/Functional/Eel/Helper/CookiePunchConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public function initDummySiteNode() {
*/
public function validEelExpressionIsEvaluatedCorrectly()
{
$conditionalServiceRendering = new CookiePunchConfig();
$cookiePunchConfig = new CookiePunchConfig();

$eelExpression = '${1 + 1 == 2}';
$actual = $conditionalServiceRendering->evaluateEelExpression($eelExpression, $this->dummySiteNode);
$actual = $cookiePunchConfig->evaluateEelExpression($eelExpression, $this->dummySiteNode);

self::assertTrue($actual, "Not a valid eel expression: " . $eelExpression);
}
Expand All @@ -56,23 +56,10 @@ public function invalidEelExpressionThrowsException()
{
self::expectExceptionMessage('Invalid eel expression in CookiePunch config service block. Given: ${1 + 1 == 2');

$conditionalServiceRendering = new CookiePunchConfig();
$cookiePunchConfig = new CookiePunchConfig();

$eelExpression = '${1 + 1 == 2';
$conditionalServiceRendering->evaluateEelExpression($eelExpression, $this->dummySiteNode);
}

/**
* @test
*/
public function eelExpressionThatDoesNotResolveToBoolThrowsException()
{
self::expectExceptionMessage('An eel expression was used in CookiePunch config service block that does not resolve to boolean. Given: ${"hello"}');

$conditionalServiceRendering = new CookiePunchConfig();

$eelExpression = '${"hello"}';
$conditionalServiceRendering->evaluateEelExpression($eelExpression, $this->dummySiteNode);
$cookiePunchConfig->evaluateEelExpression($eelExpression, $this->dummySiteNode);
}

/**
Expand All @@ -82,11 +69,11 @@ public function eelExpressionThatDoesNotResolveToBoolThrowsException()
*/
public function testIfSitenodeIsPutCorrectlyIntoContext()
{
$conditionalServiceRendering = new CookiePunchConfig();
$cookiePunchConfig = new CookiePunchConfig();

$eelExpression = '${site != null}';

$actual = $conditionalServiceRendering->evaluateEelExpression($eelExpression, $this->dummySiteNode);
$actual = $cookiePunchConfig->evaluateEelExpression($eelExpression, $this->dummySiteNode);

self::assertTrue($actual, "Sitenode not found in context");
}
Expand Down

0 comments on commit e82ea5a

Please sign in to comment.