BladeHelpersTest.php 699 B

123456789101112131415
  1. <?php
  2. namespace Illuminate\Tests\View\Blade;
  3. class BladeHelpersTest extends AbstractBladeTestCase
  4. {
  5. public function testEchosAreCompiled()
  6. {
  7. $this->assertSame('<?php echo csrf_field(); ?>', $this->compiler->compileString('@csrf'));
  8. $this->assertSame('<?php echo method_field(\'patch\'); ?>', $this->compiler->compileString("@method('patch')"));
  9. $this->assertSame('<?php dd($var1); ?>', $this->compiler->compileString('@dd($var1)'));
  10. $this->assertSame('<?php dd($var1, $var2); ?>', $this->compiler->compileString('@dd($var1, $var2)'));
  11. $this->assertSame('<?php dump($var1, $var2); ?>', $this->compiler->compileString('@dump($var1, $var2)'));
  12. }
  13. }