Completed
Branch master (078ac8)
by Pierre-Henry
35:09
created

LangTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 5 1
A testTranslate() 0 5 1
1
<?php
2
/**
3
 * @author           Pierre-Henry Soria <[email protected]>
4
 * @copyright        (c) 2017, Pierre-Henry Soria. All Rights Reserved.
5
 * @license          GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
6
 * @package          PH7 / Test / Unit / Framework / Util
7
 */
8
9
namespace PH7\Test\Unit\Framework\Util;
10
11
use PH7\Framework\Translate\Lang;
12
use PH7\Framework\Registry\Registry;
13
14
class LangTest extends \PHPUnit_Framework_TestCase
15
{
16
    protected function setUp()
17
    {
18
        new Lang; // Load "Lang" class
19
        Registry::getInstance()->lang = [];
20
    }
21
22
    public function testTranslate()
23
    {
24
        $sName = 'Pierre-Henry';
25
        $this->assertEquals('Hello Pierre-Henry', t('Hello %0%', $sName));
26
    }
27
 }
28