Tweak tests
This commit is contained in:
parent
8fa1477d7d
commit
298b6edf66
|
|
@ -9,7 +9,7 @@ class CheckInstallation
|
|||
public function handle($request, \Closure $next)
|
||||
{
|
||||
if (env('DB_CONNECTION') == 'dummy') {
|
||||
return $next($request);
|
||||
return $next($request); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
if (SetupController::checkTablesExist()) {
|
||||
|
|
|
|||
|
|
@ -32,9 +32,11 @@ class CheckPlayerExist
|
|||
$responses = event(new CheckPlayerExists($player_name));
|
||||
|
||||
foreach ($responses as $r) {
|
||||
// @codeCoverageIgnoreStart
|
||||
if ($r) {
|
||||
return $next($request);
|
||||
} // @codeCoverageIgnore
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
}
|
||||
|
||||
if (! Player::where('name', $player_name)->get()->isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -129,6 +129,8 @@ class AdminControllerTest extends BrowserKitTestCase
|
|||
->type('/^([0-9]+)$/', 'custom_player_name_regexp')
|
||||
->select('1', 'api_type')
|
||||
->check('auto_del_invalid_texture')
|
||||
->uncheck('allow_downloading_texture')
|
||||
->type('abc', 'texture_name_regexp')
|
||||
->type('policy', 'content_policy')
|
||||
->type('code', 'comment_script')
|
||||
->press('submit_general');
|
||||
|
|
@ -143,6 +145,8 @@ class AdminControllerTest extends BrowserKitTestCase
|
|||
$this->assertEquals('/^([0-9]+)$/', option('custom_player_name_regexp'));
|
||||
$this->assertEquals('1', option('api_type'));
|
||||
$this->assertTrue(option('auto_del_invalid_texture'));
|
||||
$this->assertFalse(option('allow_downloading_texture'));
|
||||
$this->assertEquals('abc', option('texture_name_regexp'));
|
||||
$this->assertEquals('policy', option_localized('content_policy'));
|
||||
$this->assertEquals('code', option('comment_script'));
|
||||
|
||||
|
|
|
|||
|
|
@ -358,6 +358,9 @@ class SkinlibControllerTest extends TestCase
|
|||
->get('/skinlib/upload')
|
||||
->assertViewHas('user')
|
||||
->assertViewHas('with_out_filter', true);
|
||||
|
||||
option(['texture_name_regexp' => 'abc']);
|
||||
$this->get('/skinlib/upload')->assertViewHas('extra');
|
||||
}
|
||||
|
||||
public function testHandleUpload()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user