user info

This commit is contained in:
Nabeel Shahzad
2017-06-09 14:47:02 -05:00
parent 292727cf74
commit 8831f875ef
20 changed files with 560 additions and 43 deletions

View File

@@ -7,8 +7,13 @@ abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
*
* @var string
*/
protected $app;
protected $baseUrl = 'http://localhost';
public function __construct($name = null, array $data = [], $dataName = '') {
parent::__construct($name, $data, $dataName);
}
/**
* Creates the application.
*
@@ -17,9 +22,12 @@ abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap();
return $app;
}
public function createRepository($repo_name) {
$app = $this->createApplication();
return $app->make('App\Repositories\\' + $repo_name);
}
}