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

NotTest::testNotTrue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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