Test Failed
Push — master ( 324182...871a01 )
by
unknown
11:38
created

GrommunioCardDavBackendTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 3 1
A testConstruct() 0 2 1
A setUp() 0 4 1
1
<?php
2
/*
3
 * SPDX-License-Identifier: AGPL-3.0-only
4
 * SPDX-FileCopyrightText: Copyright 2016 - 2018 Kopano b.v.
5
 * SPDX-FileCopyrightText: Copyright 2020 grommunio GmbH
6
 *
7
 * Tests for grommunio Card DAV backend class which handles
8
 * contact related activities.
9
 */
10
11
namespace grommunio\DAV;
12
13
/**
14
 * @internal
15
 * @coversNothing
16
 */
17
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...
18
	private $gDavBackendMock;
19
	private $kCardDavBackend;
20
21
	/**
22
	 * {@inheritDoc}
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
	 * {@inheritDoc}
34
	 *
35
	 * @see PHPUnit_Framework_TestCase::tearDown()
36
	 */
37
	protected function tearDown() {
38
		$this->kCardDavBackend = null;
39
		$this->gDavBackendMock = null;
40
	}
41
42
	/**
43
	 * Tests if the constructor is created without errors.
44
	 */
45
	public function testConstruct() {
46
		$this->assertTrue(is_object($this->kCardDavBackend));
47
	}
48
}
49