Completed
Push — master ( 74f423...06a480 )
by Siwapun
05:31 queued 03:49
created

NotTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
dl 0
loc 35
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A testNotFalse() 0 5 1
A testNotTrue() 0 5 1
A testNotNull() 0 5 1
A testNotObject() 0 5 1
A testNotEmptyString() 0 5 1
1
<?php
2
3
namespace Aerophant\RamdaTest;
4
5
use function Aerophant\Ramda\not;
6
use PHPUnit\Framework\TestCase;
7
8
class NotTest extends TestCase
9
{
10
  public function testNotTrue()
11
  {
12
    $value = true;
13
    $actual = not()($value);
14
    $this->assertFalse($actual);
15
  }
16
17
  public function testNotFalse()
18
  {
19
    $value = false;
20
    $actual = not()($value);
21
    $this->assertTrue($actual);
22
  }
23
24
  public function testNotNull()
25
  {
26
    $value = null;
27
    $actual = not()($value);
28
    $this->assertTrue($actual);
29
  }
30
31
  public function testNotEmptyString()
32
  {
33
    $value = '';
34
    $actual = not()($value);
35
    $this->assertTrue($actual);
36
  }
37
38
  public function testNotObject()
39
  {
40
    $value = new \stdClass();
41
    $actual = not()($value);
42
    $this->assertFalse($actual);
43
  }
44
}
45