Completed
Branch master (136162)
by Aimeos
06:57
created

I18nTest::testGet()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 17
rs 9.9332
c 1
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
class I18nTest extends AimeosTestAbstract
4
{
5
	public function testGet()
6
	{
7
		$aimeos = $this->app->make('\Aimeos\Shop\Base\Aimeos');
8
9
		$configMock = $this->getMockBuilder('\Illuminate\Config\Repository')
10
			->setMethods( array('get', 'has') )->getMock();
11
12
		$configMock->expects( $this->once() )->method('has')
13
			->will( $this->returnValue(true) );
14
15
		$configMock->expects( $this->exactly(3) )->method('get')
16
			->will( $this->onConsecutiveCalls( true, 'laravel:', array() ) );
17
18
		$object = new \Aimeos\Shop\Base\I18n($configMock, $aimeos);
19
		$list = $object->get( array('en') );
20
21
		$this->assertInstanceOf( '\Aimeos\MW\Translation\Iface', $list['en'] );
22
	}
23
}
24