Skip to content

Commit

Permalink
Code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
João Almeida committed Jan 28, 2020
1 parent f227d4d commit e5084f4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions tests/BladeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function setUp()
return "<?php echo with({$expression})->format('F d, Y g:i a'); ?>";
});

$this->blade->if('ifdate', function($date){
$this->blade->if('ifdate', function ($date) {
return $date instanceof DateTime;
});
}
Expand Down Expand Up @@ -71,7 +71,7 @@ public function testShare()

public function testComposer()
{
$this->blade->composer('variables', function(View $view){
$this->blade->composer('variables', function (View $view) {
$view->with('name', 'John Doe and ' . $view->offsetGet('name'));
});

Expand All @@ -81,10 +81,10 @@ public function testComposer()

public function testCreator()
{
$this->blade->creator('variables', function(View $view){
$this->blade->creator('variables', function (View $view) {
$view->with('name', 'John Doe');
});
$this->blade->composer('variables', function(View $view){
$this->blade->composer('variables', function (View $view) {
$view->with('name', 'Jane Doe and ' . $view->offsetGet('name'));
});

Expand Down Expand Up @@ -164,17 +164,17 @@ public function testOther()
$this->assertEquals($output, $this->expected('other'));
}

public function testExtends()
private function expected(string $file): string
{
$output = $this->blade->make('extends');
$file_path = __DIR__ . '/expected/' . $file . '.html';

$this->assertEquals($output, $this->expected('extends'));
return file_get_contents($file_path);
}

private function expected(string $file): string
public function testExtends()
{
$file_path = __DIR__ . '/expected/' . $file . '.html';
$output = $this->blade->make('extends');

return file_get_contents($file_path);
$this->assertEquals($output, $this->expected('extends'));
}
}

0 comments on commit e5084f4

Please sign in to comment.