diff --git a/tests/src/flextype/core/Parsers/Expressions/DateExpressionTest.php b/tests/src/flextype/core/Parsers/Expressions/DateExpressionTest.php index 881df6f8..6a83e4cd 100644 --- a/tests/src/flextype/core/Parsers/Expressions/DateExpressionTest.php +++ b/tests/src/flextype/core/Parsers/Expressions/DateExpressionTest.php @@ -20,12 +20,12 @@ test('date expression', function () { test('time expression', function () { $time = time(); - entries()->create('time', ['test' => '[[ time() ]]']); + entries()->create('time', ['test' => '@type[int] [[ time() ]]']); expect(entries()->fetch('time')['test'])->toBe($time); }); test('strtotime expression', function () { $date = strtotime("10 September 2000"); - entries()->create('strtotime', ['test' => '[[ strtotime("10 September 2000"); ]]']); + entries()->create('strtotime', ['test' => '[[ strtotime("10 September 2000") ]]']); expect(entries()->fetch('strtotime')['test'])->toBe($date); }); \ No newline at end of file diff --git a/tests/src/flextype/core/Parsers/Expressions/UnlessExpressionTest.php b/tests/src/flextype/core/Parsers/Expressions/UnlessExpressionTest.php index aead2a55..ca28c215 100644 --- a/tests/src/flextype/core/Parsers/Expressions/UnlessExpressionTest.php +++ b/tests/src/flextype/core/Parsers/Expressions/UnlessExpressionTest.php @@ -18,9 +18,9 @@ test('unless expression', function () { 'title' => 'Title', 'test-unless-positive' => '[[ unless(title == "Foo", "Yes!") ]]', - 'test-unless-negative' => '[[ unless(title == "Title", "No!") ]]' + 'test-unless-negative' => '[[ unless(title == "Title", "Yes!") ]]' ]); expect(entries()->fetch('unless')['test-unless-positive'])->toBe('Yes!'); - expect(entries()->fetch('unless')['test-unless-negative'])->toBe('No!'); + expect(entries()->fetch('unless')['test-unless-negative'])->toBe(''); }); \ No newline at end of file diff --git a/tests/src/flextype/core/Parsers/Expressions/WhenExpressionTest.php b/tests/src/flextype/core/Parsers/Expressions/WhenExpressionTest.php index 16f7b01a..035c7011 100644 --- a/tests/src/flextype/core/Parsers/Expressions/WhenExpressionTest.php +++ b/tests/src/flextype/core/Parsers/Expressions/WhenExpressionTest.php @@ -18,9 +18,9 @@ test('when expression', function () { 'title' => 'Title', 'test-when-positive' => '[[ when(title == "Title", "Yes!") ]]', - 'test-when-negative' => '[[ when(title == "Foo", "No!") ]]' + 'test-when-negative' => '[[ when(title == "Foo", "Yes!") ]]' ]); expect(entries()->fetch('when')['test-when-positive'])->toBe('Yes!'); - expect(entries()->fetch('when')['test-when-negative'])->toBe('No!'); + expect(entries()->fetch('when')['test-when-negative'])->toBe(''); }); \ No newline at end of file