Completed
Pull Request — master (#21)
by Robbie
01:41
created

ComposerLoaderTest::testGetJson()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
namespace BringYourOwnIdeas\UpdateChecker\Tests;
4
5
use BringYourOwnIdeas\UpdateChecker\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...sts\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...sts\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