Completed
Push — master ( 0ca83f...63d559 )
by Mahmoud
05:04
created

WebTestCase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 7 1
A tearDown() 0 7 1
1
<?php
2
3
namespace App\Containers\Authentication\Tests;
4
5
use App\Ship\Parents\Tests\PhpUnit\TestCase as ShipTestCase;
6
7
/**
8
 * Class WebTestCase
9
 *
10
 * Container Web TestCase class. Use this class to put your Web container specific tests helper functions.
11
 *
12
 * @author  Mahmoud Zalt  <[email protected]>
13
 */
14
class WebTestCase extends ShipTestCase
15
{
16
    // overrides the default subDomain in the base URL
17
    protected $subDomain = 'admin';
18
19
    public function setUp()
20
    {
21
        // change the API_PREFIX for web tests
22
        putenv("API_PREFIX=api");
23
24
        parent::setUp();
25
    }
26
27
    public function tearDown()
28
    {
29
        // revert the API_PREFIX variable to null to avoid effects on other test
30
        putenv("API_PREFIX=");
31
32
        parent::tearDown();
33
    }
34
}
35