Passed
Push — master ( 8a4054...04fdd7 )
by Sérgio
06:29
created

ContainsText::test()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 9
rs 9.6666
c 0
b 0
f 0
1
<?php
2
3
namespace Prelude\Tests;
4
5
use function Prelude\Contains;
6
7
class ContainsText extends \PHPUnit\Framework\TestCase
8
{
9
    public function test()
10
    {
11
        $ls = ['name' => 'James'];
12
        $this->assertTrue(contains('James')($ls));
13
        $this->assertFalse(contains('Kirk')($ls));
14
15
        $nums = [10, 20, 30];
16
        $this->assertTrue(contains(10)($nums));
17
    }
18
}
19