blessing-skin-server/tests/HttpTest/MiddlewareTest/CheckInstallationTest.php
2020-06-24 10:52:02 +08:00

28 lines
685 B
PHP

<?php
namespace Tests;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class CheckInstallationTest extends TestCase
{
use DatabaseTransactions;
public function testHandle()
{
$this->get('/setup')->assertSee('Already installed');
$this->mock(Filesystem::class, function ($mock) {
$mock->shouldReceive('exists')
->with(storage_path('install.lock'))
->twice()
->andReturn(false);
});
$this->get('/setup')->assertSee(trans(
'setup.wizard.welcome.text',
['version' => config('app.version')]
));
}
}