TestCase   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 2
dl 0
loc 30
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 6 1
A getPackageProviders() 0 6 1
A getEnvironmentSetUp() 0 13 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