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

IsEmptyTest::testIsEmptyWithEmptyArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
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\isEmpty;
6
use PHPUnit\Framework\TestCase;
7
8
class IsEmptyTest extends TestCase
9
{
10
  public function testIsEmptyWithNull()
11
  {
12
    $actual = isEmpty()(null);
13
    $this->assertTrue($actual);
14
  }
15
  public function testIsEmptyWithEmptyArray()
16
  {
17
    $actual = isEmpty()([]);
18
    $this->assertTrue($actual);
19
  }
20
  public function testIsEmptyWithNonEmptyArray()
21
  {
22
    $actual = isEmpty()([1, 2, 3]);
23
    $this->assertFalse($actual);
24
  }
25
  public function testIsEmptyWithStdClass()
26
  {
27
    $actual = isEmpty()(new \stdClass());
28
    $this->assertFalse($actual);
29
  }
30
}
31