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

ReplaceTest::testReplace()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Aerophant\RamdaTest;
4
5
use function Aerophant\Ramda\replace;
6
use PHPUnit\Framework\TestCase;
7
8
class ReplaceTest extends TestCase
9
{
10
  public function testReplace()
11
  {
12
    $search = 'foo';
13
    $replace = 'bar';
14
    $subject = 'foo foo foo';
15
    $expect = 'bar foo foo';
16
    $actual = replace($search)($replace)($subject);
17
    $this->assertEquals($expect, $actual);
18
  }
19
}
20