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

ContainsText   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A test() 0 9 1
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