Completed
Push — master ( 76f910...59ebee )
by Siwapun
05:41 queued 03:38
created

testIdenticalWithDifferencePrimitiveValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Aerophant\RamdaTest;
3
4
use function Aerophant\Ramda\identical;
5
use Aerophant\RamdaTest\Asset\PlainObjectAsset;
6
use PHPUnit\Framework\TestCase;
7
8
class IdenticalTest extends TestCase
9
{
10
11
  public function testIdenticalWithSameObject()
12
  {
13
    $firstValue = new PlainObjectAsset();
14
    $secondValue = $firstValue;
15
    $actual = identical($firstValue)($secondValue);
16
    $this->assertTrue($actual);
17
  }
18
19
  public function testIdenticalWithDifferenceObject()
20
  {
21
    $firstValue = new PlainObjectAsset();
22
    $secondValue = new PlainObjectAsset();
23
    $actual = identical($firstValue)($secondValue);
24
    $this->assertFalse($actual);
25
  }
26
27
  public function testIdenticalWithSamePrimitiveValue()
28
  {
29
    $firstValue = '1';
30
    $secondValue = '1';
31
    $actual = identical($firstValue)($secondValue);
32
    $this->assertTrue($actual);
33
  }
34
35
  public function testIdenticalWithDifferencePrimitiveValue()
36
  {
37
    $firstValue = '11';
38
    $secondValue = '22';
39
    $actual = identical($firstValue)($secondValue);
40
    $this->assertFalse($actual);
41
  }
42
}
43