APCTest::testAll()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2015-2025
6
 */
7
8
9
namespace Aimeos\Base\Translation\Decorator;
10
11
12
class APCTest extends \PHPUnit\Framework\TestCase
13
{
14
	private $object;
15
16
17
	protected function setUp() : void
18
	{
19
		$trans = new \Aimeos\Base\Translation\None( 'en_GB' );
20
		$this->object = new \Aimeos\Base\Translation\Decorator\APC( $trans, 'i18n' );
21
	}
22
23
24
	protected function tearDown() : void
25
	{
26
		unset( $this->object );
27
	}
28
29
30
	public function testAll()
31
	{
32
		$this->assertEquals( [], $this->object->all( 'domain' ) );
33
	}
34
35
36
	public function testDt()
37
	{
38
		$this->assertEquals( 'test', $this->object->dt( 'domain', 'test' ) );
39
	}
40
41
42
	public function testDn()
43
	{
44
		$this->assertEquals( 'tests', $this->object->dn( 'domain', 'test', 'tests', 2 ) );
45
	}
46
47
48
	public function testGetLocale()
49
	{
50
		$this->assertEquals( 'en_GB', $this->object->getLocale() );
51
	}
52
}
53