Skip to content

Commit 2bd35c1

Browse files
committed
update tests
1 parent ab814e9 commit 2bd35c1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

tests/View/Blade/BladeExpressionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ public function tearDown()
1616
public function testExpressionsOnTheSameLine()
1717
{
1818
$compiler = new BladeCompiler($this->getFiles(), __DIR__);
19-
$this->assertEquals('<?php echo app(\'translator\')->get(foo(bar(baz(qux(breeze()))))); ?> space () <?php echo app(\'translator\')->get(foo(bar)); ?>', $compiler->compileString('@lang(foo(bar(baz(qux(breeze()))))) space () @lang(foo(bar))'));
19+
$this->assertEquals('<?php echo app(\'translator\')->getFromJson(foo(bar(baz(qux(breeze()))))); ?> space () <?php echo app(\'translator\')->getFromJson(foo(bar)); ?>', $compiler->compileString('@lang(foo(bar(baz(qux(breeze()))))) space () @lang(foo(bar))'));
2020
}
2121

2222
public function testExpressionWithinHTML()
2323
{
2424
$compiler = new BladeCompiler($this->getFiles(), __DIR__);
2525
$this->assertEquals('<html <?php echo e($foo); ?>>', $compiler->compileString('<html {{ $foo }}>'));
2626
$this->assertEquals('<html<?php echo e($foo); ?>>', $compiler->compileString('<html{{ $foo }}>'));
27-
$this->assertEquals('<html <?php echo e($foo); ?> <?php echo app(\'translator\')->get(\'foo\'); ?>>', $compiler->compileString('<html {{ $foo }} @lang(\'foo\')>'));
27+
$this->assertEquals('<html <?php echo e($foo); ?> <?php echo app(\'translator\')->getFromJson(\'foo\'); ?>>', $compiler->compileString('<html {{ $foo }} @lang(\'foo\')>'));
2828
}
2929

3030
protected function getFiles()

tests/View/Blade/BladeLangTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ public function testStatementThatContainsNonConsecutiveParanthesisAreCompiled()
1717
{
1818
$compiler = new BladeCompiler($this->getFiles(), __DIR__);
1919
$string = "Foo @lang(function_call('foo(blah)')) bar";
20-
$expected = "Foo <?php echo app('translator')->get(function_call('foo(blah)')); ?> bar";
20+
$expected = "Foo <?php echo app('translator')->getFromJson(function_call('foo(blah)')); ?> bar";
2121
$this->assertEquals($expected, $compiler->compileString($string));
2222
}
2323

2424
public function testLanguageAndChoicesAreCompiled()
2525
{
2626
$compiler = new BladeCompiler($this->getFiles(), __DIR__);
27-
$this->assertEquals('<?php echo app(\'translator\')->get(\'foo\'); ?>', $compiler->compileString("@lang('foo')"));
27+
$this->assertEquals('<?php echo app(\'translator\')->getFromJson(\'foo\'); ?>', $compiler->compileString("@lang('foo')"));
2828
$this->assertEquals('<?php echo app(\'translator\')->choice(\'foo\', 1); ?>', $compiler->compileString("@choice('foo', 1)"));
2929
}
3030

0 commit comments

Comments
 (0)