Completed
Push — master ( 5c4201...24a9b5 )
by Siwapun
05:35
created

IsNilTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 16
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testIsNilWithEmptyArray() 0 4 1
A testIsNilWithNull() 0 4 1
A testIsNilWithEmptyStdClassObject() 0 4 1
1
<?php
2
3
namespace Aerophant\RamdaTest;
4
5
use function Aerophant\Ramda\isNil;
6
use PHPUnit\Framework\TestCase;
7
8
class IsNilTest extends TestCase
9
{
10
  public function testIsNilWithNull()
11
  {
12
    $actual = isNil()(null);
13
    $this->assertTrue($actual);
14
  }
15
  public function testIsNilWithEmptyArray()
16
  {
17
    $actual = isNil()([]);
18
    $this->assertFalse($actual);
19
  }
20
  public function testIsNilWithEmptyStdClassObject()
21
  {
22
    $actual = isNil()(new \stdClass());
23
    $this->assertFalse($actual);
24
  }
25
}
26