Files
monica/tests/Feature/VersionCheckTest.php
T
Tobias Fröberg 6ef07ee355 Use the config helper instead of putenv in the test suit (#608)
We've used putenv() to set environment variables in tests forcing us
to reload the environment. We don't have to if we use the config
helper in Laravel instead.
2017-10-12 17:39:51 -04:00

26 lines
588 B
PHP

<?php
namespace Tests\Feature;
use Tests\FeatureTestCase;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class VersionCheckTest extends FeatureTestCase
{
use DatabaseTransactions;
/**
* If an instance sets `version_check` env variable to false, the command
* should exit with 0.
*
* @return void
*/
public function test_check_version_set_to_false_disables_the_check()
{
config(['monica.check_version' => false]);
$resultCommand = $this->artisan('monica:ping');
$this->assertEquals(0, $resultCommand);
}
}