Skip to content

Commit

Permalink
[TASK] Add non-working test cases for BooleanParser (#955)
Browse files Browse the repository at this point in the history
As this is a more complicated issue, we first provide test cases and
disable them for now.

Related issue: #533
  • Loading branch information
s2b authored Aug 11, 2024
1 parent 4d5b0c9 commit 438556c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Functional/ViewHelpers/IfThenElseViewHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,15 @@ public static function renderDataProvider(): \Generator
['verdict' => false],
0,
];
/**
* @todo This should work but doesn't at the moment. This is probably related to the boolean
* parser not converting variable nodes correctly. There is a related todo in the BooleanParserTest.
yield 'test' => [
'<f:if condition="{test}"><f:then>then</f:then><f:else>else</f:else></f:if>',
['test' => '""'],
'then',
];
*/
}

#[DataProvider('renderDataProvider')]
Expand Down
6 changes: 6 additions & 0 deletions tests/Unit/Core/Parser/BooleanParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ public static function getSomeEvaluationTestValues(): array
['{foo}', true, ['foo' => true]],
['{foo} == FALSE', true, ['foo' => false]],
['!{foo}', true, ['foo' => false]],

/*
* @todo This should work but doesn't at the moment. This is probably related to the boolean
* parser not converting variable nodes correctly. There is a related todo in the IfThenElseViewHelperTest.
['{foo}', true, ['foo' => '""']],
*/
];
}

Expand Down

0 comments on commit 438556c

Please sign in to comment.