You've already forked php-flasher
mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-04-05 12:32:55 +01:00
fix blade directive tests
This commit is contained in:
@@ -66,7 +66,7 @@ final class Laravel4 extends Laravel
|
||||
$value = "array()";
|
||||
}
|
||||
|
||||
return str_replace("%criteria%", $value, $matches[1] . "<?php echo app('flasher.renderer')->render(%criteria%, 'html'); ?>");
|
||||
return str_replace("%criteria%", $value, $matches[1] . "<?php echo app('flasher.renderer')->render(%criteria%, array('format' => 'html')); ?>");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ final class Laravel50 extends Laravel
|
||||
$value = "array()";
|
||||
}
|
||||
|
||||
return str_replace("%criteria%", $value, $matches[1] . "<?php echo app('flasher.renderer')->render(%criteria%, 'html'); ?>");
|
||||
return str_replace("%criteria%", $value, $matches[1] . "<?php echo app('flasher.renderer')->render(%criteria%, array('format' => 'html')); ?>");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ final class FlasherServiceProviderTest extends TestCase
|
||||
/** @var BladeCompiler $blade */
|
||||
$blade = $this->app->make('view')->getEngineResolver()->resolve('blade')->getCompiler();
|
||||
|
||||
$this->assertEquals("<?php echo app('flasher.renderer')->render(array(), 'html'); ?>", $blade->compileString('@flasher_render'));
|
||||
$this->assertEquals("<?php echo app('flasher.renderer')->render(array(), 'html'); ?>", $blade->compileString('@flasher_render()'));
|
||||
$this->assertEquals("<?php echo app('flasher.renderer')->render(array(), 'html'); ?>", $blade->compileString('@flasher_render(array())'));
|
||||
$this->assertEquals("<?php echo app('flasher.renderer')->render(array(\"priority\" => array(\"min\" => 4, \"max\" => 5)), 'html'); ?>", $blade->compileString('@flasher_render(array("priority" => array("min" => 4, "max" => 5)))'));
|
||||
$this->assertEquals("<?php echo app('flasher.renderer')->render(array(), array('format' => 'html')); ?>", $blade->compileString('@flasher_render'));
|
||||
$this->assertEquals("<?php echo app('flasher.renderer')->render(array(), array('format' => 'html')); ?>", $blade->compileString('@flasher_render()'));
|
||||
$this->assertEquals("<?php echo app('flasher.renderer')->render(array(), array('format' => 'html')); ?>", $blade->compileString('@flasher_render(array())'));
|
||||
$this->assertEquals("<?php echo app('flasher.renderer')->render(array(\"priority\" => array(\"min\" => 4, \"max\" => 5)), array('format' => 'html')); ?>", $blade->compileString('@flasher_render(array("priority" => array("min" => 4, "max" => 5)))'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user