Skip to content

Commit

Permalink
Require testbench so PHPUnit tests can make use of Laravel model events
Browse files Browse the repository at this point in the history
There are a number of issues related to Laravel not firing model events
when using PHPUnit

laravel/framework#1181
laravel/framework#4975

This package seems to help with that

https://github.com/orchestral/testbench
  • Loading branch information
Andrew Smith committed Jun 10, 2015
1 parent 5cccfa9 commit f1e6fbf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
},
"require-dev": {
"phpunit/phpunit": "4.6.*",
"laravel/framework": "~5.0"
"laravel/framework": "~5.0",
"orchestra/testbench": "~3.0"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 4 additions & 1 deletion tests/FunctionalTestCase.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
<?php namespace EloquentVersioned\Tests;

use Illuminate\Database\Capsule\Manager as DBM;
use Orchestra\Testbench\TestCase;

class FunctionalTestCase extends \PHPUnit_Framework_TestCase
class FunctionalTestCase extends TestCase
{

public function setUp()
{
parent::setUp();

$this->configureDatabase();
$this->migrateTables();
}
Expand Down

0 comments on commit f1e6fbf

Please sign in to comment.