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

Passed
Pull Request — master (#924)
by
unknown
08:00
created

DiContainerTest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 3 2
A test_compilation_enabled_false() 0 7 1
A test_compilation_enabled_true() 0 7 1
1
<?php
2
3
namespace SmrTest\Container;
4
5
use PHPUnit\Framework\TestCase;
6
use Smr\Container\DiContainer;
7
8
class DiContainerTest extends TestCase {
9
	private const PHPDI_COMPILED_CONTAINER_FILE = "/tmp/CompiledContainer.php";
10
11
	protected function tearDown(): void {
12
		if (file_exists(self::PHPDI_COMPILED_CONTAINER_FILE)) {
13
			unlink(self::PHPDI_COMPILED_CONTAINER_FILE);
14
		}
15
	}
16
17
	public function test_compilation_enabled_true() {
18
		// Given environment variable is turned on
19
		$_ENV["ENABLE_PHPDI_COMPILATION"] = "true";
20
		// And the container is built
21
		DiContainer::initializeContainer();
22
		// Then
23
		self::assertFileExists(self::PHPDI_COMPILED_CONTAINER_FILE);
24
	}
25
26
	public function test_compilation_enabled_false() {
27
		// Given environment variable is turned off
28
		unset($_ENV["ENABLE_PHPDI_COMPILATION"]);
29
		// And the container is built
30
		DiContainer::initializeContainer();
31
		// Then
32
		self::assertFileDoesNotExist(self::PHPDI_COMPILED_CONTAINER_FILE);
33
	}
34
}
35