Completed
Pull Request — master (#44)
by Robbie
01:14
created

ComposerLoaderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetJson() 0 8 1
A testGetLock() 0 8 1
1
<?php
2
3
namespace BringYourOwnIdeas\Maintenance\Tests\Util;
4
5
use BringYourOwnIdeas\Maintenance\Util\ComposerLoader;
6
use PHPUnit_Framework_TestCase;
7
use SapphireTest;
8
9
/**
10
 * @mixin PHPUnit_Framework_TestCase
11
 */
12
class ComposerLoaderTest extends SapphireTest
13
{
14
    public function testGetJson()
15
    {
16
        $loader = new ComposerLoader();
17
        $this->assertNotEmpty(
0 ignored issues
show
Bug introduced by
The method assertNotEmpty() does not seem to exist on object<BringYourOwnIdeas...til\ComposerLoaderTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
18
            $loader->getJson()->require->{'silverstripe/framework'},
19
            'JSON file is loaded and parsed'
20
        );
21
    }
22
23
    public function testGetLock()
24
    {
25
        $loader = new ComposerLoader();
26
        $this->assertNotEmpty(
0 ignored issues
show
Bug introduced by
The method assertNotEmpty() does not seem to exist on object<BringYourOwnIdeas...til\ComposerLoaderTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
27
            $loader->getLock()->packages,
28
            'Lock file is loaded and parsed'
29
        );
30
    }
31
}
32