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

I18nTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 11
dl 0
loc 19
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGet() 0 17 1
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