Completed
Push — master ( 554150...480ec4 )
by Aimeos
02:39
created

FlyWebdavTest::testGetProviderNoBaseuri()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 12
Code Lines 7

Duplication

Lines 12
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 12
loc 12
rs 9.4286
cc 2
eloc 7
nc 2
nop 0
1
<?php
2
3
namespace Aimeos\MW\Filesystem;
4
5
6 View Code Duplication
class FlyWebdavTest extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
7
{
8
	public function testGetProvider()
9
	{
10
		if( !class_exists( '\League\Flysystem\WebDAV\WebDAVAdapter' ) ) {
11
			$this->markTestSkipped( 'Install Flysystem WebDAV adapter' );
12
		}
13
14
		$object = new FlyWebdav( array( 'baseUri' => 'http://test.webdav.org/dav/' ) );
15
		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
16
17
		$object->has( 'test' );
18
	}
19
20
21
	public function testGetProviderNoBaseuri()
22
	{
23
		if( !class_exists( '\League\Flysystem\WebDAV\WebDAVAdapter' ) ) {
24
			$this->markTestSkipped( 'Install Flysystem WebDAV adapter' );
25
		}
26
27
		$object = new FlyWebdav( array() );
28
		$this->assertInstanceof( '\Aimeos\MW\Filesystem\Iface', $object );
29
30
		$this->setExpectedException( '\InvalidArgumentException' );
31
		$object->has( 'test' );
32
	}
33
}
34