Test Failed
Branch master (5e8424)
by Randy
02:43
created

BooleanEnsuranceTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testIsTrue() 0 8 1
A testIsFalse() 0 8 1
1
<?php
2
3
use Dgame\Ensurance\Exception\EnsuranceException;
4
use PHPUnit\Framework\TestCase;
5
use function Dgame\Ensurance\ensure;
6
7
class BooleanEnsuranceTest extends TestCase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
8
{
9
    public function testIsTrue()
10
    {
11
        ensure((2 * 3) === (3 * 2))->isTrue();
12
13
        $this->expectException(EnsuranceException::class);
14
15
        ensure((2 * 2) === (3 * 2))->isTrue();
16
    }
17
18
    public function testIsFalse()
19
    {
20
        ensure((2 * 3) === (3 * 3))->isFalse();
21
22
        $this->expectException(EnsuranceException::class);
23
24
        ensure((2 * 3) === (3 * 2))->isFalse();
25
    }
26
}