I'm trying to run unit tests on my controller using oceshtral/testbench I have the following setup
protected function getPackageProviders($app)
{
return [
LaravelModulesServiceProvider::class,
CoreServiceProvider::class,
BrokerquotesServiceProvider::class,
ViewServiceProvider::class,
UserServiceProvider::class,
];
}
protected function getEnvironmentSetUp($app)
{
$app['path.base'] = __DIR__ . '/..';
$app['config']->set('app.debug', true);
$app['config']->set('app.log','single');
$app['config']->set('app.log_level','debug');
$app['config']->set('translatable.locales', ['en']);
$app['config']->set('modules.paths.modules', __DIR__ . '/../Modules');
$app['config']->set('database.default', 'mysql');
$app['config']->set('database.connections.mysql', array(
'driver' => 'mysql',
'database' => 'dohlapse',
'host' => 'localhost',
'port' => '3306',
'username' => 'homestead',
'password' => 'secret',
));
$app['config']->set('uuid.default_uuid_column','uuid');
$app['config']->set('asgard.user.driver', 'Sentinel' );
return $app;
}
and I call a test
public function setUp()
{
parent::setUp();
$faker = Faker\Factory::create();
$this->crawler = $this->call('POST', 'brokerquotes.requests', array_merge(
factory(Request::class)->make()->toArray(),
factory(\Modules\Brokerquotes\Entities\Insuree::class)->make(['user_id' => null])->toArray()
,['meta_key' => 'brokerquotes__loan']
,$this->generateLoanMetaData()
,['email' => $faker->email]
));
}
public function getEnvironmentSetup($app)
{
$app = parent::getEnvironmentSetup($app);
$app['router']->post('brokerquotes.requests', [
'uses' => '\Modules\Brokerquotes\Http\Controllers\RequestController@store'
]);
return $app;
}
However my tests to the contoller are coming back with
No hint path defined for [brokerquotes]. /home/vagrant/Code/dohlapse/vendor/laravel/framework/src/Illuminate/View/FileViewFinder.php line 112
I'm not to familiar with integration testing but wondering it its because my views aren't loaded.
What is causing this error?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2xyOYYw
via IFTTT
Aucun commentaire:
Enregistrer un commentaire