Completed
Push — master ( 8871bc...78797b )
by Siwapun
03:45
created

SortTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testSort() 0 9 1
1
<?php
2
3
namespace Aerophant\RamdaTest;
4
5
use PHPUnit\Framework\TestCase;
6
use function Aerophant\Ramda\sort;
7
8
class SortTest extends TestCase
9
{
10
  public function testSort()
11
  {
12
    $diff = function ($a, $b) {
13
      return $a - $b;
14
    };
15
    $array = [4,2,7,5];
16
    $expect = [2, 4, 5, 7];
17
    $actual = sort($diff)($array);
18
    $this->assertEquals($expect, $actual);
19
  }
20
}
21