Skip to content

Commit

Permalink
Renamed namespaces to PSR-4
Browse files Browse the repository at this point in the history
  • Loading branch information
dees040 committed Mar 20, 2018
1 parent 765142d commit 0573fac
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 19 deletions.
16 changes: 12 additions & 4 deletions README.md
Expand Up @@ -6,6 +6,14 @@

Festing is a very very great name made by combining the words fast and testing. Because that is what this package is for. Faster tests in Laravel. The package is inspired by a great article from [Nate Denlinger](https://natedenlinger.com/my-suggestions-to-speed-up-testing-with-laravel-and-phpunit/).

Before 'Festing':

![Before fast database tests](https://i.imgur.com/mbtRUS3.png)

After 'Festing':

![After fast database tests](https://i.imgur.com/KfZsFm1.png)

## Installation

Installation and setup time is estimated to be around 5 minutes in existing Laravel projects and 2 minutes in new projects. Install this package via composer.
Expand All @@ -17,15 +25,15 @@ composer require --dev dees040/festing
If you're using Laravel >= 5.5 this package will automatically be added to your providers list. If using a lower version, add the service provider to the `providers` array in `config/app.php`.

```php
dees040\Festing\ServiceProvider::class,
Dees040\Festing\ServiceProvider::class,
```

You're now ready for setup.

The package comes with a small config file. The default config should be good in most use cases. However, feel free to change it. To publish the config file run the following command

```bash
php artisan vendor:publish --provider="dees040\Festing\ServiceProvider" --tag="config"
php artisan vendor:publish --provider="Dees040\Festing\ServiceProvider" --tag="config"
```

## Setup
Expand Down Expand Up @@ -58,7 +66,7 @@ protected function setUpTraits()
{
$uses = parent::setUpTraits();

if (isset($uses[\dees040\Festing\ShouldFest::class])) {
if (isset($uses[\Dees040\Festing\ShouldFest::class])) {
$this->runFester();
}

Expand All @@ -78,7 +86,7 @@ To actually execute the database refresher you need to use `ShouldFest` trait in
namespace Tests\Unit;

use Tests\TestCase;
use dees040\Festing\ShouldFest;
use Dees040\Festing\ShouldFest;

class ExampleTest extends TestCase
{
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -18,18 +18,18 @@
},
"autoload": {
"psr-4": {
"dees040\\Festing\\": "src/Festing"
"Dees040\\Festing\\": "src/Festing"
}
},
"autoload-dev": {
"psr-4": {
"dees040\\Festing\\Tests\\": "tests/"
"Dees040\\Festing\\Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"providers": [
"dees040\\Festing\\ServiceProvider"
"Dees040\\Festing\\ServiceProvider"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion example/ExampleTest.php.example
Expand Up @@ -3,7 +3,7 @@
namespace Tests\Feature;

use Tests\TestCase;
use dees040\Festing\ShouldFest;
use Dees040\Festing\ShouldFest;
use Illuminate\Foundation\Testing\WithFaker;

class ExampleTest extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion example/TestCase.php.example
Expand Up @@ -2,7 +2,7 @@

namespace Tests;

use dees040\Festing\FestTheDatabase;
use Dees040\Festing\FestTheDatabase;
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
Expand Down
2 changes: 1 addition & 1 deletion src/Festing/Commands/stubs/test.stub
Expand Up @@ -3,7 +3,7 @@
namespace DummyNamespace;

use Tests\TestCase;
use dees040\Festing\ShouldFest;
use Dees040\Festing\ShouldFest;
use Illuminate\Foundation\Testing\WithFaker;

class DummyClass extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion src/Festing/Commands/stubs/unit-test.stub
Expand Up @@ -3,7 +3,7 @@
namespace DummyNamespace;

use Tests\TestCase;
use dees040\Festing\ShouldFest;
use Dees040\Festing\ShouldFest;
use Illuminate\Foundation\Testing\WithFaker;

class DummyClass extends TestCase
Expand Down
2 changes: 1 addition & 1 deletion src/Festing/FestTheDatabase.php
@@ -1,6 +1,6 @@
<?php

namespace dees040\Festing;
namespace Dees040\Festing;

use Illuminate\Support\Facades\DB;

Expand Down
4 changes: 2 additions & 2 deletions src/Festing/ServiceProvider.php
@@ -1,8 +1,8 @@
<?php

namespace dees040\Festing;
namespace Dees040\Festing;

use dees040\Festing\Commands\FestCommand;
use Dees040\Festing\Commands\FestCommand;
use Illuminate\Support\ServiceProvider as BaseServiceProvider;

class ServiceProvider extends BaseServiceProvider
Expand Down
2 changes: 1 addition & 1 deletion src/Festing/ShouldFest.php
@@ -1,6 +1,6 @@
<?php

namespace dees040\Festing;
namespace Dees040\Festing;

trait ShouldFest
{
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
@@ -1,8 +1,8 @@
<?php

namespace dees040\Festing\Tests;
namespace Dees040\Festing\Tests;

use dees040\Festing\ServiceProvider;
use Dees040\Festing\ServiceProvider;
use Orchestra\Testbench\TestCase as BaseTestCase;

abstract class TestCase extends BaseTestCase
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/CommandTest.php
@@ -1,8 +1,8 @@
<?php

namespace dees040\Festing\Tests\Unit;
namespace Dees040\Festing\Tests\Unit;

use dees040\Festing\Tests\TestCase;
use Dees040\Festing\Tests\TestCase;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\Artisan;

Expand Down

0 comments on commit 0573fac

Please sign in to comment.