Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Pull Request — master (#15)
by Der Mundschenk
02:30
created

Hyphenator_Cache_Test   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 1
cbo 3
dl 0
loc 39
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 *  This file is part of PHP-Typography.
4
 *
5
 *  Copyright 2016-2017 Peter Putzer.
6
 *
7
 *  This program is free software; you can redistribute it and/or
8
 *  modify it under the terms of the GNU General Public License
9
 *  as published by the Free Software Foundation; either version 2
10
 *  of the License, or ( at your option ) any later version.
11
 *
12
 *  This program is distributed in the hope that it will be useful,
13
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 *  GNU General Public License for more details.
16
 *
17
 *  You should have received a copy of the GNU General Public License
18
 *  along with this program; if not, write to the Free Software
19
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
 *
21
 *  @package mundschenk-at/php-typography/tests
22
 *  @license http://www.gnu.org/licenses/gpl-2.0.html
23
 */
24
25
namespace PHP_Typography\Tests;
26
27
/**
28
 * Test Hyphenator_Cache class.
29
 *
30
 * @coversDefaultClass \PHP_Typography\Hyphenator_Cache
31
 * @usesDefaultClass \PHP_Typography\Hyphenator_Cache
32
 *
33
 * @uses PHP_Typography\Hyphenator
34
 */
35
class Hyphenator_Cache_Test extends PHP_Typography_Testcase {
36
	/**
37
	 * Hyphenator_Cache fixture.
38
	 *
39
	 * @var \PHP_Typography\Hyphenator_Cache|null
40
	 */
41
	protected $c;
42
43
	/**
44
	 * Sets up the fixture, for example, opens a network connection.
45
	 * This method is called before a test is executed.
46
	 */
47
	protected function setUp() {
48
		$this->c = new \PHP_Typography\Hyphenator_Cache();
49
	}
50
51
	/**
52
	 * Tears down the fixture, for example, closes a network connection.
53
	 * This method is called after a test is executed.
54
	 */
55
	protected function tearDown() {
56
		$this->c = null;
57
	}
58
59
	/**
60
	 * Tests set_hyphenator.
61
	 *
62
	 * @covers ::set_hyphenator
63
	 * @covers ::get_hyphenator
64
	 */
65
	public function test_hyphenator_cache() {
66
		$hyphenator = new \PHP_Typography\Hyphenator();
67
68
		$this->assertSame( null, $this->c->get_hyphenator( 'de' ) );
69
		$this->c->set_hyphenator( 'de', $hyphenator );
70
		$this->assertSame( $hyphenator, $this->c->get_hyphenator( 'de' ) );
71
		$this->assertSame( null, $this->c->get_hyphenator( 'foobar' ) );
72
	}
73
}
74