GrommunioCardDavBackendTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A tearDown() 0 3 1
A testConstruct() 0 2 1
1
<?php
2
3
/*
4
 * SPDX-License-Identifier: AGPL-3.0-only
5
 * SPDX-FileCopyrightText: Copyright 2016 - 2018 Kopano b.v.
6
 * SPDX-FileCopyrightText: Copyright 2020 grommunio GmbH
7
 *
8
 * Tests for grommunio Card DAV backend class which handles
9
 * contact related activities.
10
 */
11
12
namespace grommunio\DAV;
13
14
/**
15
 * @internal
16
 *
17
 * @coversNothing
18
 */
19
class GrommunioCardDavBackendTest extends \PHPUnit_Framework_TestCase {
0 ignored issues
show
Bug introduced by
The type PHPUnit_Framework_TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
20
	private $gDavBackendMock;
21
	private $kCardDavBackend;
22
23
	/**
24
	 * @see PHPUnit_Framework_TestCase::setUp()
25
	 */
26
	protected function setUp() {
27
		$gloggerMock = $this->getMockBuilder(GLogger::class)->disableOriginalConstructor()->getMock();
28
		$this->gDavBackendMock = $this->getMockBuilder(GrommunioDavBackend::class)->disableOriginalConstructor()->getMock();
29
		$this->kCardDavBackend = new GrommunioCardDavBackend($this->gDavBackendMock, $gloggerMock);
30
	}
31
32
	/**
33
	 * @see PHPUnit_Framework_TestCase::tearDown()
34
	 */
35
	protected function tearDown() {
36
		$this->kCardDavBackend = null;
37
		$this->gDavBackendMock = null;
38
	}
39
40
	/**
41
	 * Tests if the constructor is created without errors.
42
	 */
43
	public function testConstruct() {
44
		$this->assertTrue(is_object($this->kCardDavBackend));
45
	}
46
}
47