Skip to content

Commit

Permalink
Merge 9633b81 into 107b730
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed Nov 1, 2013
2 parents 107b730 + 9633b81 commit f86f8b5
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
12 changes: 6 additions & 6 deletions README.md
@@ -1,7 +1,7 @@
Laravel Package Unit Testing Helper
==============

`Orchestra\Testbench` is a simple package that is suppose to help you write test cases for your Laravel package especially when there is routing involved.
`Orchestra\Testbench` is a simple package that is supposed to help you write tests for your Laravel package, especially when there is routing involved.

[![Latest Stable Version](https://poser.pugx.org/orchestra/testbench/v/stable.png)](https://packagist.org/packages/orchestra/testbench)
[![Total Downloads](https://poser.pugx.org/orchestra/testbench/downloads.png)](https://packagist.org/packages/orchestra/testbench)
Expand Down Expand Up @@ -29,7 +29,7 @@ To install through composer, simply put the following in your `composer.json` fi

## Usage

To use Orchestra\Testbench all you need to do is extend `Orchestra\Testbench\TestCase` instead of `PHPUnit_Framework_TestCase`. The fixture `app` booted by `Orchestra\Testbench\TestCase` is predefined to follow the base Laravel 4 application skeleton.
To use Orchestra\Testbench, all you need to do is extend `Orchestra\Testbench\TestCase` instead of `PHPUnit_Framework_TestCase`. The fixture `app` booted by `Orchestra\Testbench\TestCase` is predefined to follow the base application skeleton of Laravel 4.

```php
<?php
Expand All @@ -40,7 +40,7 @@ class TestCase extends Orchestra\Testbench\TestCase {}

### Custom Service Provider

To load your package service provider override the `getPackageProviders`.
To load your package service provider, override the `getPackageProviders`.

```php

Expand All @@ -52,7 +52,7 @@ To load your package service provider override the `getPackageProviders`.

### Custom Aliases

To load your package alias override the `getPackageAliases`.
To load your package alias, override the `getPackageAliases`.

```php

Expand All @@ -66,7 +66,7 @@ To load your package alias override the `getPackageAliases`.

## Testing Route Filters

By default Route filters are disabled by Laravel because ideally you should test the filter separately. In order to overwrite this default add the following code:
By default, route filters are disabled by Laravel because, ideally, you should test the filter separately. In order to overwrite this default, add the following code:

```php

Expand All @@ -77,4 +77,4 @@ $this->app['router']->enableFilters();

Fatal error: Class 'Illuminate\Foundation\Testing\TestCase' not found in /laravel/workbench/foo/bar/vendor/orchestra/testbench/src/Orchestra/Testbench/TestCase.php

Due to the requirement to include `laravel/framework` when you install `orchestra/testbench`, please remove any **illuminate** dependencies to avoid fail installation.
Due to the requirement to include `laravel/framework` when you install `orchestra/testbench`, please remove any **Illuminate** dependencies to avoid a failed installation.
5 changes: 5 additions & 0 deletions src/Orchestra/Testbench/TestCase.php
Expand Up @@ -100,14 +100,19 @@ protected function getApplicationProviders()
'Illuminate\Foundation\Providers\KeyGeneratorServiceProvider',
'Illuminate\Log\LogServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Foundation\Providers\MaintenanceServiceProvider',
'Illuminate\Database\MigrationServiceProvider',
'Illuminate\Foundation\Providers\OptimizeServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
'Illuminate\Foundation\Providers\PublisherServiceProvider',
'Illuminate\Queue\QueueServiceProvider',
'Illuminate\Redis\RedisServiceProvider',
'Illuminate\Auth\Reminders\ReminderServiceProvider',
'Illuminate\Foundation\Providers\RouteListServiceProvider',
'Illuminate\Database\SeedServiceProvider',
'Illuminate\Foundation\Providers\ServerServiceProvider',
'Illuminate\Session\SessionServiceProvider',
'Illuminate\Foundation\Providers\TinkerServiceProvider',
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
Expand Down
5 changes: 3 additions & 2 deletions src/fixture/app/config/app.php
Expand Up @@ -60,8 +60,8 @@
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, long string, otherwise these encrypted values will not
| be safe. Make sure to change it before deploying any application!
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/

Expand All @@ -79,4 +79,5 @@
*/

'manifest' => storage_path().'/meta',

);
12 changes: 10 additions & 2 deletions src/fixture/app/config/auth.php
Expand Up @@ -8,7 +8,7 @@
|--------------------------------------------------------------------------
|
| This option controls the authentication driver that will be utilized.
| This drivers manages the retrieval and authentication of the users
| This driver manages the retrieval and authentication of the users
| attempting to get access to protected areas of your application.
|
| Supported: "database", "eloquent"
Expand Down Expand Up @@ -52,11 +52,19 @@
| that should be used as your password reminder e-mail. You will also
| be able to set the name of the table that holds the reset tokens.
|
| The "expire" time is the number of minutes that the reminder should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/

'reminder' => array(

'email' => 'emails.auth.reminder', 'table' => 'password_reminders',
'email' => 'emails.auth.reminder',

'table' => 'password_reminders',

'expire' => 60,

),

Expand Down
2 changes: 1 addition & 1 deletion src/fixture/app/config/session.php
Expand Up @@ -24,7 +24,7 @@
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle for it is expired. If you want them
| to be allowed to remain idle before it expires. If you want them
| to immediately expire when the browser closes, set it to zero.
|
*/
Expand Down

0 comments on commit f86f8b5

Please sign in to comment.