BuildR_TestCase   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 5
Bugs 2 Features 3
Metric Value
wmc 2
c 5
b 2
f 3
lcom 0
cbo 5
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A assertConstantDefined() 0 3 1
A assertConstantEquals() 0 3 1
1
<?php namespace BuildR\TestTools;
2
3
use BuildR\TestTools\Asserts\IsConstantDefinedConstraint;
4
use BuildR\TestTools\Asserts\IsConstantValueEqualsConstraint;
5
use BuildR\TestTools\Traits\FakeDataGenerator;
6
use BuildR\TestTools\Traits\ReflectionUtilities;
7
use PHPUnit_Framework_TestCase;
8
9
/**
10
 * Test case that use the traits for testing that this package provides
11
 *
12
 * BuildR PHP Framework
13
 *
14
 * @author Zoltán Borsos <[email protected]>
15
 * @package TestTools
16
 *
17
 * @copyright    Copyright 2016, Zoltán Borsos.
18
 * @license      https://github.com/BuildrPHP/Test-Tools/blob/master/LICENSE.md
19
 * @link         https://github.com/BuildrPHP/Test-Tools
20
 */
21
//@codingStandardsIgnoreStart
22
class BuildR_TestCase extends PHPUnit_Framework_TestCase {
23
//@codingStandardsIgnoreEnd
24
25
    use FakeDataGenerator;
26
    use ReflectionUtilities;
27
28
    /**
29
     * Assert that the given constant is defined in the global namespace
30
     *
31
     * @param string $constantName
32
     *
33
     * @codeCoverageIgnore
34
     */
35
    public function assertConstantDefined($constantName) {
36
        self::assertThat($constantName, (new IsConstantDefinedConstraint()));
37
    }
38
39
    /**
40
     * Assert that the given constant value is equals with thi given expectation
41
     *
42
     * @param string $constantName
43
     * @param string $expected
44
     *
45
     * @codeCoverageIgnore
46
     */
47
    public function assertConstantEquals($constantName, $expected) {
48
        self::assertThat($constantName, (new IsConstantValueEqualsConstraint($expected)));
49
    }
50
51
}
52