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

BooleanEnsuranceTest::testIsTrue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
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
}