Completed
Pull Request — master (#22)
by Siwapun
03:42
created

ReplaceAllTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testReplace() 0 8 1
1
<?php
2
3
namespace Aerophant\RamdaTest;
4
5
use function Aerophant\Ramda\replace;
6
use function Aerophant\Ramda\replaceAll;
7
use PHPUnit\Framework\TestCase;
8
9
class ReplaceAllTest extends TestCase
10
{
11
  public function testReplace()
12
  {
13
    $search = 'foo';
14
    $replace = 'bar';
15
    $subject = 'foo foo foo';
16
    $expect = 'bar bar bar';
17
    $actual = replaceAll($search)($replace)($subject);
18
    $this->assertEquals($expect, $actual);
19
  }
20
}
21