Passed
Push — master ( 2a3d19...5e9e4e )
by Caen
05:36 queued 13s
created

TranslationServiceProviderTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testValidation() 0 3 1
A testRegister() 0 6 1
A testBoot() 0 5 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Hyde\Publications\Testing\Feature;
6
7
use Hyde\Publications\Providers\TranslationServiceProvider;
8
use Hyde\Testing\TestCase;
9
10
/**
11
 * @covers \Hyde\Publications\Providers\TranslationServiceProvider
12
 */
13
class TranslationServiceProviderTest extends TestCase
14
{
15
    public function testRegister()
16
    {
17
        (new TranslationServiceProvider($this->app))->register();
18
19
        $this->assertSame('en', config('app.locale'));
20
        $this->assertSame('en', config('app.fallback_locale'));
21
    }
22
23
    public function testBoot()
24
    {
25
        (new TranslationServiceProvider($this->app))->boot();
26
27
        $this->assertTrue(true);
28
    }
29
30
    public function testValidation()
31
    {
32
        $this->assertSame('The :attribute must be accepted.', __('validation.accepted'));
33
    }
34
}
35