Completed
Pull Request — master (#90)
by Alex
04:37
created

TSchemaTypeTest::testIsOKJammedOpen()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 7
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace AlgoWeb\ODataMetadata\Tests;
4
5
use AlgoWeb\ODataMetadata\MetadataV3\edm\TSchemaType;
6
use Mockery as m;
7
8
class TSchemaTypeTest extends TestCase
9
{
10 View Code Duplication
    public function testIsOKJammedOpen()
1 ignored issue
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
    {
12
        $foo = m::mock(TSchemaType::class)->makePartial()->shouldAllowMockingProtectedMethods();
13
        $foo->shouldReceive('getRand')->andReturn(2)->once();
14
15
        $this->assertTrue($foo->isOK());
16
    }
17
18 View Code Duplication
    public function testIsOKNotJammedOpen()
1 ignored issue
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
19
    {
20
        $foo = m::mock(TSchemaType::class)->makePartial()->shouldAllowMockingProtectedMethods();
21
        $foo->shouldReceive('getRand')->andReturn(0)->once();
22
23
        $this->assertFalse($foo->isOK());
24
    }
25
}
26