mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-03 00:40:12 -05:00
Generate unit tests for form requests
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\MassUpsertPlaylistTorrentRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'playlist_id' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'integer',
|
||||
],
|
||||
'torrent_urls' => [
|
||||
'required',
|
||||
'max:65535',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\ApproveApplicationRequest();
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'email' => [
|
||||
'required',
|
||||
'string',
|
||||
'email',
|
||||
'max:70',
|
||||
'unique:invites',
|
||||
'unique:users',
|
||||
],
|
||||
'approve' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\DestroyDistributorRequest();
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'distributor_id' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\DestroyRegionRequest();
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'region_id' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\RejectApplicationRequest();
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'deny' => 'required',
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreArticleRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'title' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
'content' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:65536',
|
||||
],
|
||||
'image' => [
|
||||
'max:10240',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreBanRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'owned_by' => [
|
||||
],
|
||||
'ban_reason' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:65536',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreBlacklistClientRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'unique:blacklist_clients',
|
||||
],
|
||||
'reason' => [
|
||||
'sometimes',
|
||||
'string',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreBonExchangeRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'description' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'value' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'cost' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'type' => [
|
||||
'required',
|
||||
'string',
|
||||
'in:upload,download,personal_freeleech,invite',
|
||||
'exclude',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreCategoryRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'icon' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'meta' => [
|
||||
'required',
|
||||
'string',
|
||||
'in:movie,tv,game,music,no',
|
||||
'exclude',
|
||||
],
|
||||
'image' => [
|
||||
'max:10240',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreChatRoomRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreChatStatusRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'color' => [
|
||||
'required',
|
||||
],
|
||||
'icon' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreDistributorRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'unique:distributors,name',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreForumRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
],
|
||||
'parent_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'permissions' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
],
|
||||
'permissions.*' => [
|
||||
'sometimes',
|
||||
'exists:groups,id',
|
||||
],
|
||||
'permissions.*.show_forum' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'permissions.*.read_topic' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'permissions.*.reply_topic' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'permissions.*.start_topic' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreGiftRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'username' => [
|
||||
'required',
|
||||
'exists:users,username',
|
||||
'max:180',
|
||||
],
|
||||
'seedbonus' => [
|
||||
'required',
|
||||
'integer',
|
||||
'min:0',
|
||||
],
|
||||
'invites' => [
|
||||
'required',
|
||||
'integer',
|
||||
'min:0',
|
||||
],
|
||||
'fl_tokens' => [
|
||||
'required',
|
||||
'integer',
|
||||
'min:0',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreGroupRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'unique:groups',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'level' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'download_slots' => [
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'color' => [
|
||||
'required',
|
||||
],
|
||||
'icon' => [
|
||||
'required',
|
||||
],
|
||||
'effect' => [
|
||||
'sometimes',
|
||||
],
|
||||
'is_internal' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_modo' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_admin' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_owner' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_trusted' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_immune' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_freeleech' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_double_upload' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_incognito' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'can_upload' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'autogroup' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreInternalRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'icon' => [
|
||||
'required',
|
||||
],
|
||||
'effect' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreMassActionRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'subject' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
'message' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:65536',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreMediaLanguageRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'unique:media_languages',
|
||||
],
|
||||
'code' => [
|
||||
'required',
|
||||
'string',
|
||||
'unique:media_languages',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreNoteRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'message' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StorePageRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'content' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreRegionRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'unique:regions,name',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreResolutionRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreRssRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'min:3',
|
||||
'max:255',
|
||||
],
|
||||
'search' => [
|
||||
'max:255',
|
||||
],
|
||||
'description' => [
|
||||
'max:255',
|
||||
],
|
||||
'uploader' => [
|
||||
'max:255',
|
||||
],
|
||||
'categories' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:999',
|
||||
],
|
||||
'categories.*' => [
|
||||
'sometimes',
|
||||
'exists:categories,id',
|
||||
],
|
||||
'types' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:999',
|
||||
],
|
||||
'types.*' => [
|
||||
'sometimes',
|
||||
'exists:types,id',
|
||||
],
|
||||
'resolutions' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:999',
|
||||
],
|
||||
'resolutions.*' => [
|
||||
'sometimes',
|
||||
'exists:resolutions,id',
|
||||
],
|
||||
'genres' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:999',
|
||||
],
|
||||
'genres.*' => [
|
||||
'sometimes',
|
||||
'exists:genres,id',
|
||||
],
|
||||
'position' => [
|
||||
'sometimes',
|
||||
'integer',
|
||||
'max:9999',
|
||||
],
|
||||
'imdb' => [
|
||||
'sometimes',
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'tvdb' => [
|
||||
'sometimes',
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'tmdb' => [
|
||||
'sometimes',
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'mal' => [
|
||||
'sometimes',
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'freeleech' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'doubleupload' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'featured' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'stream' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'highspeed' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'sd' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'internal' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'personalrelease' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'bookmark' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'alive' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'dying' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'dead' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreTypeRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreUnbanRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'owned_by' => [
|
||||
],
|
||||
'unban_reason' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:65536',
|
||||
],
|
||||
'group_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
'exists:groups,id',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\StoreWatchedUserRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'message' => [
|
||||
'required',
|
||||
'string',
|
||||
'min:3',
|
||||
],
|
||||
'user_id' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateArticleRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'title' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
'content' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:65536',
|
||||
],
|
||||
'image' => [
|
||||
'max:10240',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateBlacklistClientRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
'reason' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:65536',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateBonExchangeRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'description' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'value' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'cost' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'type' => [
|
||||
'required',
|
||||
'string',
|
||||
'in:upload,download,personal_freeleech,invite',
|
||||
'exclude',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateCategoryRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'icon' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'meta' => [
|
||||
'required',
|
||||
'string',
|
||||
'in:movie,tv,game,music,no',
|
||||
'exclude',
|
||||
],
|
||||
'image' => [
|
||||
'max:10240',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateChatBotRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'min:1',
|
||||
'max:255',
|
||||
],
|
||||
'command' => [
|
||||
'required',
|
||||
'alpha_dash',
|
||||
'min:1',
|
||||
'max:255',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
'color' => [
|
||||
'required',
|
||||
],
|
||||
'icon' => [
|
||||
'required',
|
||||
],
|
||||
'emoji' => [
|
||||
'required',
|
||||
],
|
||||
'help' => [
|
||||
'sometimes',
|
||||
'max:9999',
|
||||
],
|
||||
'info' => [
|
||||
'sometimes',
|
||||
'max:9999',
|
||||
],
|
||||
'about' => [
|
||||
'sometimes',
|
||||
'max:9999',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateChatRoomRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateChatStatusRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'color' => [
|
||||
'required',
|
||||
],
|
||||
'icon' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateDistributorRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateForumRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
],
|
||||
'parent_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'permissions' => [
|
||||
'array',
|
||||
],
|
||||
'permissions.*' => [
|
||||
'exists:groups,id',
|
||||
],
|
||||
'permissions.*.show_forum' => [
|
||||
'boolean',
|
||||
],
|
||||
'permissions.*.read_topic' => [
|
||||
'boolean',
|
||||
],
|
||||
'permissions.*.reply_topic' => [
|
||||
'boolean',
|
||||
],
|
||||
'permissions.*.start_topic' => [
|
||||
'boolean',
|
||||
],
|
||||
'forum_type' => [
|
||||
'in:category,forum',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateGroupRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'level' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'download_slots' => [
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'color' => [
|
||||
'required',
|
||||
],
|
||||
'icon' => [
|
||||
'required',
|
||||
],
|
||||
'effect' => [
|
||||
'sometimes',
|
||||
],
|
||||
'is_internal' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_modo' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_admin' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_owner' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_trusted' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_immune' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_freeleech' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_double_upload' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'is_incognito' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'can_upload' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'autogroup' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateInternalRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'icon' => [
|
||||
'required',
|
||||
],
|
||||
'effect' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateMediaLanguageRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'code' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateModerationRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'old_status' => [
|
||||
'required',
|
||||
],
|
||||
'status' => [
|
||||
'required',
|
||||
],
|
||||
'message' => [
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdatePageRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'content' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateRegionRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateReportRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'verdict' => [
|
||||
'required',
|
||||
'min:3',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateResolutionRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateRssRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'min:3',
|
||||
'max:255',
|
||||
],
|
||||
'search' => [
|
||||
'max:255',
|
||||
],
|
||||
'description' => [
|
||||
'max:255',
|
||||
],
|
||||
'uploader' => [
|
||||
'max:255',
|
||||
],
|
||||
'categories' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:999',
|
||||
],
|
||||
'categories.*' => [
|
||||
'sometimes',
|
||||
'exists:categories,id',
|
||||
],
|
||||
'types' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:999',
|
||||
],
|
||||
'types.*' => [
|
||||
'sometimes',
|
||||
'exists:types,id',
|
||||
],
|
||||
'resolutions' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:999',
|
||||
],
|
||||
'resolutions.*' => [
|
||||
'sometimes',
|
||||
'exists:resolutions,id',
|
||||
],
|
||||
'genres' => [
|
||||
'sometimes',
|
||||
'array',
|
||||
'max:999',
|
||||
],
|
||||
'genres.*' => [
|
||||
'sometimes',
|
||||
'exists:genres,id',
|
||||
],
|
||||
'position' => [
|
||||
'sometimes',
|
||||
'integer',
|
||||
'max:9999',
|
||||
],
|
||||
'imdb' => [
|
||||
'sometimes',
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'tvdb' => [
|
||||
'sometimes',
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'tmdb' => [
|
||||
'sometimes',
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'mal' => [
|
||||
'sometimes',
|
||||
'nullable',
|
||||
'integer',
|
||||
],
|
||||
'freeleech' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'doubleupload' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'featured' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'stream' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'highspeed' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'sd' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'internal' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'personalrelease' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'bookmark' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'alive' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'dying' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'dead' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateTypeRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
],
|
||||
'position' => [
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\Staff\UpdateUserRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'username' => [
|
||||
'required',
|
||||
],
|
||||
'uploaded' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'downloaded' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'title' => [
|
||||
'nullable',
|
||||
'present',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
'about' => [
|
||||
'nullable',
|
||||
'present',
|
||||
'string',
|
||||
'max:16777216',
|
||||
],
|
||||
'group_id' => [
|
||||
'required',
|
||||
'exists:groups,id',
|
||||
],
|
||||
'internal_id' => [
|
||||
'nullable',
|
||||
'exists:internals,id',
|
||||
],
|
||||
'seedbonus' => [
|
||||
'required',
|
||||
'decimal:0,2',
|
||||
'min:0',
|
||||
],
|
||||
'invites' => [
|
||||
'required',
|
||||
'integer',
|
||||
'min:0',
|
||||
],
|
||||
'fl_tokens' => [
|
||||
'required',
|
||||
'integer',
|
||||
'min:0',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreGiftRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'receiver_username' => [
|
||||
'required',
|
||||
],
|
||||
'cost' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
],
|
||||
'comment' => [
|
||||
'required',
|
||||
'string',
|
||||
'max:255',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StorePlaylistRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'max:255',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
'max:65535',
|
||||
],
|
||||
'is_private' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StorePlaylistTorrentRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'playlist_id' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'integer',
|
||||
],
|
||||
'torrent_id' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'integer',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StorePoll();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'title' => [
|
||||
'required',
|
||||
'min:10',
|
||||
],
|
||||
'multiple_choice' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'options.*.name' => [
|
||||
'required',
|
||||
'max:255',
|
||||
],
|
||||
'options' => [
|
||||
'array',
|
||||
'min:2',
|
||||
'max:20',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
test('messages', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->messages();
|
||||
|
||||
$this->assertEquals([
|
||||
'options.*.required' => 'You must fill in all options fields',
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StorePollVoteRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'options' => [
|
||||
'required',
|
||||
'array',
|
||||
'min:1',
|
||||
],
|
||||
'options.*' => [
|
||||
'integer',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
test('messages', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->messages();
|
||||
|
||||
$this->assertEquals([
|
||||
'options.required' => 'You must select an answer',
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreRequestFillRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'torrent_id' => [
|
||||
'required',
|
||||
],
|
||||
'filled_anon' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreSubtitleRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'subtitle_file' => [
|
||||
'required',
|
||||
'mimes:srt,ass,sup,zip',
|
||||
],
|
||||
'language_id' => [
|
||||
'required',
|
||||
],
|
||||
'note' => [
|
||||
'required',
|
||||
'max:65535',
|
||||
],
|
||||
'anon' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'torrent_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreTicketRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'category_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'priority_id' => [
|
||||
'required',
|
||||
'integer',
|
||||
],
|
||||
'subject' => [
|
||||
'required',
|
||||
'max:255',
|
||||
],
|
||||
'body' => [
|
||||
'required',
|
||||
'max:65535',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreTipRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'torrent' => [
|
||||
'bail',
|
||||
'prohibits:post',
|
||||
'required_without:post',
|
||||
'exists:torrents,id',
|
||||
],
|
||||
'post' => [
|
||||
'bail',
|
||||
'prohibits:torrent',
|
||||
'required_without:torrent',
|
||||
'exists:posts,id',
|
||||
],
|
||||
'tip' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:1',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
test('messages', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->messages();
|
||||
|
||||
$this->assertEquals([], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreTorrentRequestBountyRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'seedbonus' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:100',
|
||||
],
|
||||
'anon' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreTorrentRequestClaimRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'anon' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreTorrentRequestRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'max:180',
|
||||
],
|
||||
'imdb' => [
|
||||
],
|
||||
'tvdb' => [
|
||||
],
|
||||
'tmdb' => [
|
||||
],
|
||||
'mal' => [
|
||||
],
|
||||
'igdb' => [
|
||||
],
|
||||
'category_id' => [
|
||||
'required',
|
||||
'exists:categories,id',
|
||||
],
|
||||
'type_id' => [
|
||||
'required',
|
||||
'exists:types,id',
|
||||
],
|
||||
'resolution_id' => [
|
||||
'nullable',
|
||||
'exists:resolutions,id',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'bounty' => [
|
||||
'required',
|
||||
'numeric',
|
||||
'min:100',
|
||||
],
|
||||
'anon' => [
|
||||
'boolean',
|
||||
'required',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
test('messages', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->messages();
|
||||
|
||||
$this->assertEquals([
|
||||
'igdb.in' => "The IGBB ID must be 0 if the media doesn't exist on IGDB or you're not requesting a game.",
|
||||
'tmdb.in' => "The TMDB ID must be 0 if the media doesn't exist on TMDB or you're not requesting a tv show or movie.",
|
||||
'imdb.in' => "The IMDB ID must be 0 if the media doesn't exist on IMDB or you're not requesting a tv show or movie.",
|
||||
'tvdb.in' => "The TVDB ID must be 0 if the media doesn't exist on TVDB or you're not requesting a tv show.",
|
||||
'mal.in' => "The MAL ID must be 0 if the media doesn't exist on MAL or you're not requesting a tv or movie.",
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreTorrentRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'torrent' => [
|
||||
'required',
|
||||
'file',
|
||||
'mimes:torrent',
|
||||
'mimetypes:application/x-bittorrent',
|
||||
],
|
||||
'name' => [
|
||||
'required',
|
||||
'unique:torrents',
|
||||
'max:255',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
'max:4294967296',
|
||||
],
|
||||
'mediainfo' => [
|
||||
'nullable',
|
||||
'sometimes',
|
||||
'max:4294967296',
|
||||
],
|
||||
'bdinfo' => [
|
||||
'nullable',
|
||||
'sometimes',
|
||||
'max:4294967296',
|
||||
],
|
||||
'category_id' => [
|
||||
'required',
|
||||
'exists:categories,id',
|
||||
],
|
||||
'type_id' => [
|
||||
'required',
|
||||
'exists:types,id',
|
||||
],
|
||||
'resolution_id' => [
|
||||
'exists:resolutions,id',
|
||||
],
|
||||
'region_id' => [
|
||||
'nullable',
|
||||
'exists:regions,id',
|
||||
],
|
||||
'distributor_id' => [
|
||||
'nullable',
|
||||
'exists:distributors,id',
|
||||
],
|
||||
'imdb' => [
|
||||
],
|
||||
'tvdb' => [
|
||||
],
|
||||
'tmdb' => [
|
||||
],
|
||||
'mal' => [
|
||||
],
|
||||
'igdb' => [
|
||||
],
|
||||
'season_number' => [
|
||||
],
|
||||
'episode_number' => [
|
||||
],
|
||||
'anon' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'stream' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'sd' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'personal_release' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'internal' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'free' => [
|
||||
'sometimes',
|
||||
'integer',
|
||||
'numeric',
|
||||
'between:0,100',
|
||||
],
|
||||
'refundable' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
test('messages', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->messages();
|
||||
|
||||
$this->assertEquals([
|
||||
'igdb.in' => "The IGBB ID must be 0 if the media doesn't exist on IGDB or you're not uploading a game.",
|
||||
'tmdb.in' => "The TMDB ID must be 0 if the media doesn't exist on TMDB or you're not uploading a tv show or movie.",
|
||||
'imdb.in' => "The IMDB ID must be 0 if the media doesn't exist on IMDB or you're not uploading a tv show or movie.",
|
||||
'tvdb.in' => "The TVDB ID must be 0 if the media doesn't exist on TVDB or you're not uploading a tv show.",
|
||||
'mal.in' => "The MAL ID must be 0 if the media doesn't exist on MAL or you're not uploading a tv or movie.",
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\StoreTransactionRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'exchange' => [
|
||||
'bail',
|
||||
'required',
|
||||
'exists:bon_exchange,id',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\UpdatePlaylistRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'max:255',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
'max:65536',
|
||||
],
|
||||
'is_private' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\UpdatePollRequest();
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'title' => 'required|min:10',
|
||||
'multiple_choice' => 'required|boolean',
|
||||
'options.*.name' => 'required|max:255',
|
||||
'options.*.id' => 'required|integer',
|
||||
'options' => 'array|min:2',
|
||||
], $actual);
|
||||
});
|
||||
|
||||
test('messages', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->messages();
|
||||
|
||||
$this->assertEquals([
|
||||
'options.*.required' => 'You must fill in all options fields',
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\UpdateSubtitleRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'language_id' => [
|
||||
'required',
|
||||
],
|
||||
'note' => [
|
||||
'required',
|
||||
'max:65535',
|
||||
],
|
||||
'anon' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\UpdateTorrentRequestRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'max:180',
|
||||
],
|
||||
'imdb' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'tvdb' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'tmdb' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'mal' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'igdb' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'category_id' => [
|
||||
'required',
|
||||
'exists:categories,id',
|
||||
],
|
||||
'type_id' => [
|
||||
'required',
|
||||
'exists:types,id',
|
||||
],
|
||||
'resolution_id' => [
|
||||
'nullable',
|
||||
'exists:resolutions,id',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
'string',
|
||||
],
|
||||
'anon' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
beforeEach(function (): void {
|
||||
$this->subject = new \App\Http\Requests\UpdateTorrentRequest();
|
||||
});
|
||||
|
||||
test('authorize', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->authorize();
|
||||
|
||||
$this->assertTrue($actual);
|
||||
});
|
||||
|
||||
test('rules', function (): void {
|
||||
$this->markTestIncomplete('This test case was generated by Shift. When you are ready, remove this line and complete this test case.');
|
||||
|
||||
$actual = $this->subject->rules();
|
||||
|
||||
$this->assertValidationRules([
|
||||
'name' => [
|
||||
'required',
|
||||
'max:255',
|
||||
],
|
||||
'description' => [
|
||||
'required',
|
||||
'max:4294967296',
|
||||
],
|
||||
'mediainfo' => [
|
||||
'nullable',
|
||||
'sometimes',
|
||||
'max:4294967296',
|
||||
],
|
||||
'bdinfo' => [
|
||||
'nullable',
|
||||
'sometimes',
|
||||
'max:4294967296',
|
||||
],
|
||||
'category_id' => [
|
||||
'required',
|
||||
'exists:categories,id',
|
||||
],
|
||||
'type_id' => [
|
||||
'required',
|
||||
'exists:types,id',
|
||||
],
|
||||
'resolution_id' => [
|
||||
'exists:resolutions,id',
|
||||
],
|
||||
'region_id' => [
|
||||
'nullable',
|
||||
'exists:regions,id',
|
||||
],
|
||||
'distributor_id' => [
|
||||
'nullable',
|
||||
'exists:distributors,id',
|
||||
],
|
||||
'imdb' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'tvdb' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'tmdb' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'mal' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'igdb' => [
|
||||
'required',
|
||||
'numeric',
|
||||
],
|
||||
'season_number' => [
|
||||
'numeric',
|
||||
],
|
||||
'episode_number' => [
|
||||
'numeric',
|
||||
],
|
||||
'anon' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'stream' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'sd' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'personal_release' => [
|
||||
'required',
|
||||
'boolean',
|
||||
],
|
||||
'internal' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
'free' => [
|
||||
'sometimes',
|
||||
'between:0,100',
|
||||
],
|
||||
'refundable' => [
|
||||
'sometimes',
|
||||
'boolean',
|
||||
],
|
||||
], $actual);
|
||||
});
|
||||
|
||||
// test cases...
|
||||
Reference in New Issue
Block a user