Skip to content

Commit

Permalink
Merge branch '3.2' into 3.3
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/Exceptions/ApplicationHandler.php

Signed-off-by: crynobone <[email protected]>
  • Loading branch information
crynobone committed Aug 18, 2016
2 parents 138cdd2 + 1f475df commit 04ac51d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:
- coverage=no

before_script:
- travis_retry composer self-update
- composer config discard-changes true
- if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction; fi
- if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --prefer-stable; fi
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,14 @@ protected function getApplicationTimezone($app)
Testbench include a custom migrations command that support `realpath` option instead of the basic relative `path` option, this would make it easier for you to run database migrations during testing by just including the full realpath to your package database/migration folder.

```php
$this->artisan('migrate', [
$this->loadMigrationsFrom([
'--database' => 'testbench',
'--realpath' => realpath(__DIR__.'/../migrations'),
]);
```

> `loadMigrationFrom()` method will add an event to automatically rollback all migration during teardown process.
### Using Model Factories

Testbench include `withFactories()` method to allow you to register custom model factory path for your test suite.
Expand Down
10 changes: 10 additions & 0 deletions docs/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ title: Testbench Change Log

## Version 3.2 {#v3-2}

### v3.2.6 {#v3-2-6}

* Add `Orchestra\Testbench\TestCase::loadMigrationsFrom()` to migrate during setup and add an event to rollback the migration during teardown. ([@loren138](https://github.com/loren138))
* Add `TokenMismatchException` to `Orchestra\Testbench\Exceptions\ApplicationHandler::$dontReport` array. ([@lancepioch](https://github.com/lancepioch))

### v3.2.5 {#v3-2-5}

* Update `validation.php` language file for image dimensions validation rule.
Expand Down Expand Up @@ -39,6 +44,11 @@ title: Testbench Change Log

## Version 3.1 {#v3-1}

### v3.1.8 {#v3-1-8}

* Add `Orchestra\Testbench\TestCase::loadMigrationsFrom()` to migrate during setup and add an event to rollback the migration during teardown. ([@loren138](https://github.com/loren138))
* Update named route look-up table when `$app` is bootstrapped (backported from `3.2`).

### v3.1.7 {#v3-1-7}

* Bump to Laravel Framework v5.1.27+.
Expand Down
5 changes: 3 additions & 2 deletions src/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Handler extends ExceptionHandler
\Illuminate\Auth\Access\AuthorizationException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Session\TokenMismatchException::class,
\Illuminate\Validation\ValidationException::class,
];

Expand All @@ -33,9 +34,9 @@ protected function unauthenticated($request, AuthenticationException $e)
{
if ($request->ajax() || $request->wantsJson()) {
return response('Unauthorized.', 401);
} else {
return redirect()->guest('login');
}

return redirect()->guest('login');
}

/**
Expand Down

0 comments on commit 04ac51d

Please sign in to comment.