TestCase::getEnvironmentSetUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Tzsk\Payu\Tests;
4
5
use CreatePayuTransactionsTable;
6
use Orchestra\Testbench\TestCase as Orchestra;
7
use Tzsk\Payu\PayuServiceProvider;
8
9
class TestCase extends Orchestra
0 ignored issues
show
Bug introduced by
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: artisan, be, call, seed
Loading history...
10
{
11
    public function setUp(): void
12
    {
13
        parent::setUp();
14
15
        $this->withFactories(__DIR__.'/database/factories');
0 ignored issues
show
Bug introduced by
The method withFactories() does not seem to exist on object<Tzsk\Payu\Tests\TestCase>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
16
    }
17
18
    protected function getPackageProviders($app)
19
    {
20
        return [
21
            PayuServiceProvider::class,
22
        ];
23
    }
24
25
    public function getEnvironmentSetUp($app)
26
    {
27
        $app['config']->set('database.default', 'sqlite');
28
        $app['config']->set('database.connections.sqlite', [
29
            'driver' => 'sqlite',
30
            'database' => ':memory:',
31
            'prefix' => '',
32
        ]);
33
//        $app['config']->set('payu.gateways, ');
34
35
        include_once __DIR__ . '/../database/migrations/create_payu_transactions_table.php';
36
        (new CreatePayuTransactionsTable())->up();
37
    }
38
}
39