Skip to content

Commit

Permalink
Added fixes for unit tests with Laravel 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Stubbs committed Nov 1, 2016
1 parent e27c45e commit 5af2634
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
10 changes: 0 additions & 10 deletions tests/NilPortugues/App/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ class RouteServiceProvider extends ServiceProvider
*/
protected $namespace = 'NilPortugues\Tests\App\Controller';

/**
* Define your route model bindings, pattern filters, etc.
*
* @param \Illuminate\Routing\Router $router
*/
public function boot(Router $router)
{
parent::boot($router);
}

/**
* Define the routes for the application.
*
Expand Down
5 changes: 5 additions & 0 deletions tests/NilPortugues/App/Transformers/EmployeesTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,9 @@ public function getRelationships()
{
return [];
}

public function getRequiredProperties()
{
return [];
}
}
6 changes: 6 additions & 0 deletions tests/NilPortugues/App/Transformers/OrdersTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,10 @@ public function getRelationships()
{
return [];
}


public function getRequiredProperties()
{
return [];
}
}
3 changes: 2 additions & 1 deletion tests/NilPortugues/Laravel5/JsonApi/LaravelTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use NilPortugues\Tests\App\Transformers\EmployeesTransformer;
use NilPortugues\Tests\App\Transformers\OrdersTransformer;
use Psr\Log\NullLogger;
use Illuminate\Contracts\Container\Container;

/**
* Class LaravelTestCase.
Expand Down Expand Up @@ -96,7 +97,7 @@ private function setUpHttpKernel($app)
{
$app->instance('request', (new \Illuminate\Http\Request())->instance());
$app->make('Illuminate\Foundation\Http\Kernel', [$app, $this->getRouter()])->bootstrap();
$app->bind('Illuminate\Contracts\Debug\ExceptionHandler', new \NilPortugues\Tests\App\Exceptions\Handler(new NullLogger()));
// $app->bind('Illuminate\Contracts\Debug\ExceptionHandler', new \NilPortugues\Tests\App\Exceptions\Handler(new NullLogger()));
}

/**
Expand Down

0 comments on commit 5af2634

Please sign in to comment.