Completed
Push — master ( 847d00...93d710 )
by Siwapun
04:05
created

MemorizeTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 9
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testMemorizeWithConsruct() 0 7 1
1
<?php
2
3
namespace Aerophant\RamdaTest;
4
5
use function Aerophant\Ramda\construct;
6
use function Aerophant\Ramda\memoize;
7
use Aerophant\RamdaTest\Asset\PlainObjectAsset;
8
use PHPUnit\Framework\TestCase;
9
10
class MemorizeTest extends TestCase
11
{
12
  public function testMemorizeWithConsruct()
13
  {
14
    $constructor = construct(PlainObjectAsset::class);
15
    $memorizedConstructor = memoize()($constructor);
16
    $expect = $memorizedConstructor();
17
    $actual = $memorizedConstructor();
18
    $this->assertSame($expect, $actual);
19
  }
20
}
21