Cachet/tests/AbstractTestCase.php
2015-06-02 13:42:39 +01:00

50 lines
1020 B
PHP

<?php
/*
* This file is part of Cachet.
*
* (c) Cachet HQ <support@cachethq.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CachetHQ\Tests\Cachet;
use Illuminate\Foundation\Testing\TestCase;
abstract class AbstractTestCase extends TestCase
{
/**
* The base URL to use while testing the application.
*
* @var string
*/
protected $baseUrl = 'http://localhost';
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make('Illuminate\Contracts\Console\Kernel')->bootstrap();
return $app;
}
/**
* Becomes a user.
*
* @return void
*/
protected function beUser()
{
$this->user = factory('CachetHQ\Cachet\Models\User')->create();
$this->be($this->user);
}
}