Error executing unit testing with laravel to load custom settings file
<p>When I run the service from browser it works, but if i execute the test file i get this error: </p>

<pre><code>1) Api\Domain\Tests\ServiceTest::testSetUp
RuntimeException: A facade root has not been set.

/WWW/api/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:210
/WWW/api/src/Api/Infrastructure/Domain/Model/SolrBaseRepository.php:30
/WWW/api/src/Api/Infrastructure/Domain/Model/SolrBaseRepository.php:30
/WWW/api/src/Api/Domain/Tests/ServiceTest.php:80
</code></pre>

<p>File confguration: config/solr.php</p>

<pre><code>return array(
    'endpoint' =&gt; array(
        'localhost' =&gt; array(
            'host' =&gt; '192.168.1.100',
            'port' =&gt; 8080,
            'path' =&gt; '/solr/clients/',
        )
    )
);
</code></pre>

<p>Solr base repository: </p>

<pre><code>use Illuminate\Support\Facades\Config;

abstract class SolrBaseRepository
protected $client;


    /**
     * SolrBaseRepository constructor.
     */
    public function __construct(){
        $this-&gt;client = new \Solarium\Client(Config::get('solr'));
    }
}
</code></pre>

<p>if I change </p>

<pre><code>$this-&gt;client = new \Solarium\Client(Config::get('solr'));
</code></pre>

<p>by</p>

<pre><code>$this-&gt;client = new \Solarium\Client(array(
            'endpoint' =&gt; array(
                'localhost' =&gt; array(
                    'host' =&gt; '192.168.1.100',
                    'port' =&gt; 8080,
                    'path' =&gt; '/solr/clients/',
                )
            )
        ));
</code></pre>

<p>The test works.
ServiceTest: Api/Domain/Tests/ServiceTest.php</p>

<pre><code>class ServiceTest extends \PHPUnit_Framework_TestCase{
public function testSetUp()
    {
        $this-&gt;setUp();
        $this-&gt;solrServicesRepository = New SolrServicesRepository();
    }
}
</code></pre>

<p>I have tried to resolve it adding from <a href="https://github.com/nicolaslopezj/searchable/issues/86" rel="nofollow">this page</a> to my ServiceTest.php:</p>

<pre><code>use \Illuminate\Container\Container as Container;
use \Illuminate\Support\Facades\Facade as Facade;

/**
* Setup a new app instance container
* 
* @var Illuminate\Container\Container
*/
$app = new Container();
$app-&gt;singleton('app', 'Illuminate\Container\Container');

/**
* Set $app as FacadeApplication handler
*/
Facade::setFacadeApplication($app);
</code></pre>

<p>But this does not work for mi.</p>