<?php

namespace BringYourOwnIdeas\Maintenance\Tests\Util;

use BringYourOwnIdeas\Maintenance\Util\ComposerLoader;
use PHPUnit_Framework_TestCase;
use SilverStripe\Dev\SapphireTest;

/**
 * @mixin PHPUnit_Framework_TestCase
 */
class ComposerLoaderTest extends SapphireTest
{
    public function testGetJson()
    {
        $loader = new ComposerLoader(__DIR__ . '/Fixtures');
        $this->assertNotEmpty(
            $loader->getJson()->name,
            'JSON file is loaded and parsed'
        );
    }

    public function testGetLock()
    {
        $loader = new ComposerLoader(__DIR__ . '/Fixtures');
        $this->assertNotEmpty(
            $loader->getLock()->packages,
            'Lock file is loaded and parsed'
        );
    }
}

<?php

namespace BringYourOwnIdeas\Maintenance\Tests\Util;

use BringYourOwnIdeas\Maintenance\Util\ComposerLoader;
use PHPUnit_Framework_TestCase;
use SilverStripe\Dev\SapphireTest;

/**
 * @mixin PHPUnit_Framework_TestCase
 */
class ComposerLoaderTest extends SapphireTest
{
    public function testGetJson()
    {
        $loader = new ComposerLoader(__DIR__ . '/Fixtures');
        $this->assertNotEmpty(
            $loader->getJson()->require->{'silverstripe/framework'},
            'JSON file is loaded and parsed'
        );
    }

    public function testGetLock()
    {
        $loader = new ComposerLoader(__DIR__ . '/Fixtures');
        $this->assertNotEmpty(
            $loader->getLock()->packages,
            'Lock file is loaded and parsed'
        );
    }
}

Revert "FIX Assert not empty on something that actually is in every composer.json"
Revert "FIX Assert not empty on something that actually is in every composer.json"

This reverts commit f8cf837f6b953713c86747803808e228c648a8a4.
