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

LangTest::testTranslate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 9.4285
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