diff --git a/app/Actions/Entries/CreateEntry.php b/app/Actions/Entries/CreateEntry.php index 89a3cb4..971b947 100644 --- a/app/Actions/Entries/CreateEntry.php +++ b/app/Actions/Entries/CreateEntry.php @@ -2,6 +2,7 @@ namespace App\Actions\Entries; +use App\Exceptions\AuditionAdminException; use App\Exceptions\ManageEntryException; use App\Models\Audition; use App\Models\AuditLogEntry; @@ -83,29 +84,29 @@ class CreateEntry { // Make sure it's a valid student if (! $student || ! $student->exists()) { - throw new ManageEntryException('Invalid student provided'); + throw new AuditionAdminException('Invalid student provided'); } // Make sure the audition is valid if (! $audition || ! $audition->exists()) { - throw new ManageEntryException('Invalid audition provided'); + throw new AuditionAdminException('Invalid audition provided'); } // A student can't enter the same audition twice if (Entry::where('student_id', $student->id)->where('audition_id', $audition->id)->exists()) { - throw new ManageEntryException('That student is already entered in that audition'); + throw new AuditionAdminException('That student is already entered in that audition'); } // Can't enter a published audition if ($audition->hasFlag('seats_published')) { - throw new ManageEntryException('Cannot add an entry to an audition where seats are published'); + throw new AuditionAdminException('Cannot add an entry to an audition where seats are published'); } if ($audition->hasFlag('advancement_published')) { - throw new ManageEntryException('Cannot add an entry to an audition where advancement is published'); + throw new AuditionAdminException('Cannot add an entry to an audition where advancement is published'); } // Verify the grade of the student is in range for the audition if ($student->grade > $audition->maximum_grade) { - throw new ManageEntryException('The grade of the student exceeds the maximum for that audition'); + throw new AuditionAdminException('The grade of the student exceeds the maximum for that audition'); } if ($student->grade < $audition->minimum_grade) { - throw new ManageEntryException('The grade of the student does not meet the minimum for that audition'); + throw new AuditionAdminException('The grade of the student does not meet the minimum for that audition'); } } } diff --git a/app/Http/Controllers/Admin/EntryController.php b/app/Http/Controllers/Admin/EntryController.php index fdc7145..1a94a18 100644 --- a/app/Http/Controllers/Admin/EntryController.php +++ b/app/Http/Controllers/Admin/EntryController.php @@ -5,7 +5,7 @@ namespace App\Http\Controllers\Admin; use App\Actions\Entries\CreateEntry; use App\Actions\Entries\UpdateEntry; use App\Actions\Tabulation\CalculateScoreSheetTotal; -use App\Exceptions\ManageEntryException; +use App\Exceptions\AuditionAdminException; use App\Http\Controllers\Controller; use App\Models\Audition; use App\Models\AuditLogEntry; @@ -133,7 +133,7 @@ class EntryController extends Controller try { $entry = $creator($validData['student_id'], $validData['audition_id'], $enter_for); - } catch (ManageEntryException $ex) { + } catch (AuditionAdminException $ex) { return redirect()->route('admin.entries.index')->with('error', $ex->getMessage()); } if ($validData['late_fee_waived']) { @@ -193,7 +193,7 @@ class EntryController extends Controller } try { $updater($entry, $validData); - } catch (ManageEntryException $e) { + } catch (AuditionAdminException $e) { return redirect()->route('admin.entries.index')->with('error', $e->getMessage()); } if ($validData['late_fee_waived']) { diff --git a/app/Http/Controllers/EntryController.php b/app/Http/Controllers/EntryController.php index 24eb202..ce5c5fc 100644 --- a/app/Http/Controllers/EntryController.php +++ b/app/Http/Controllers/EntryController.php @@ -3,7 +3,7 @@ namespace App\Http\Controllers; use App\Actions\Entries\CreateEntry; -use App\Exceptions\ManageEntryException; +use App\Exceptions\AuditionAdminException; use App\Models\Audition; use App\Models\AuditLogEntry; use App\Models\Entry; @@ -57,7 +57,7 @@ class EntryController extends Controller try { $creator($validData['student_id'], $validData['audition_id'], $enter_for); - } catch (ManageEntryException $ex) { + } catch (AuditionAdminException $ex) { return redirect()->route('entries.index')->with('error', $ex->getMessage()); } diff --git a/tests/Feature/Actions/CalculateEntryScore/AllJudgesCountTest.php b/tests-old/Feature/Actions/CalculateEntryScore/AllJudgesCountTest.php similarity index 95% rename from tests/Feature/Actions/CalculateEntryScore/AllJudgesCountTest.php rename to tests-old/Feature/Actions/CalculateEntryScore/AllJudgesCountTest.php index 2225abf..b9a1b3d 100644 --- a/tests/Feature/Actions/CalculateEntryScore/AllJudgesCountTest.php +++ b/tests-old/Feature/Actions/CalculateEntryScore/AllJudgesCountTest.php @@ -13,14 +13,14 @@ use Illuminate\Support\Facades\App; uses(RefreshDatabase::class); it('throws an exception if mode is not seating or advancement', function () { - #$calculator = new AllJudgesCount(); + //$calculator = new AllJudgesCount(); $calculator = App::make(AllowForOlympicScoring::class); $calculator->calculate('WRONG', Entry::factory()->create()); })->throws(TabulationException::class, 'Mode must be seating or advancement'); it('throws an exception if entry is not valid', function () { // Arrange - #$calculator = new AllJudgesCount(); + //$calculator = new AllJudgesCount(); $calculator = App::make(AllowForOlympicScoring::class); // Act $calculator->calculate('seating', Entry::factory()->make()); @@ -41,7 +41,7 @@ it('throws an exception if entry is missing judge scores', function () { 1004 => 80, 1005 => 90, ]; - #$calculator = new AllJudgesCount(); + //$calculator = new AllJudgesCount(); $calculator = App::make(AllowForOlympicScoring::class); enterScore($judge1, $entry, $scores); // Act @@ -65,7 +65,7 @@ it('throws an exception if a score exists from an invalid judge', function () { 1004 => 80, 1005 => 90, ]; - #$calculator = new AllJudgesCount(); + //$calculator = new AllJudgesCount(); $calculator = App::make(AllowForOlympicScoring::class); enterScore($judge1, $entry, $scores); $scoreSheetToSpoof = enterScore($judge2, $entry, $scores); @@ -97,7 +97,7 @@ it('correctly calculates scores for seating', function () { 1004 => 85, 1005 => 95, ]; - #$calculator = new AllJudgesCount(); + //$calculator = new AllJudgesCount(); $calculator = App::make(AllowForOlympicScoring::class); enterScore($judge1, $entry, $scores); enterScore($judge2, $entry, $scores2); diff --git a/tests/Feature/Actions/CalculateScoreSheetTotalTest.php b/tests-old/Feature/Actions/CalculateScoreSheetTotalTest.php similarity index 99% rename from tests/Feature/Actions/CalculateScoreSheetTotalTest.php rename to tests-old/Feature/Actions/CalculateScoreSheetTotalTest.php index a3ce1c1..47cda5c 100644 --- a/tests/Feature/Actions/CalculateScoreSheetTotalTest.php +++ b/tests-old/Feature/Actions/CalculateScoreSheetTotalTest.php @@ -12,7 +12,6 @@ use Illuminate\Support\Facades\Artisan; uses(RefreshDatabase::class); - it('throws an exception if an invalid mode is called for', function () { $calculator = app(CalculateScoreSheetTotal::class); $calculator('anything', Entry::factory()->create(), User::factory()->create()); diff --git a/tests/Feature/Actions/CreateEntryTest.php b/tests-old/Feature/Actions/CreateEntryTest.php similarity index 100% rename from tests/Feature/Actions/CreateEntryTest.php rename to tests-old/Feature/Actions/CreateEntryTest.php diff --git a/tests/Feature/Actions/EnterBonusScoreTest.php b/tests-old/Feature/Actions/EnterBonusScoreTest.php similarity index 100% rename from tests/Feature/Actions/EnterBonusScoreTest.php rename to tests-old/Feature/Actions/EnterBonusScoreTest.php diff --git a/tests/Feature/Actions/EnterScoreTest.php b/tests-old/Feature/Actions/EnterScoreTest.php similarity index 98% rename from tests/Feature/Actions/EnterScoreTest.php rename to tests-old/Feature/Actions/EnterScoreTest.php index 3d668bd..ca94b17 100644 --- a/tests/Feature/Actions/EnterScoreTest.php +++ b/tests-old/Feature/Actions/EnterScoreTest.php @@ -165,7 +165,7 @@ it('saves the score with a properly formatted subscore object', function () { expect($checkScoreSheet->exists())->toBeTrue() ->and($checkScoreSheet->subscores)->toBe($desiredReturn); }); -it('throws an exception of the entry already has a score by the judge', function() { +it('throws an exception of the entry already has a score by the judge', function () { // Arrange loadSampleAudition(); $judge = User::factory()->create(); @@ -184,7 +184,7 @@ it('throws an exception of the entry already has a score by the judge', function // Assert enterScore($judge, $entry, $scores); })->throws(ScoreEntryException::class, 'That judge has already entered scores for that entry'); -it('allows an existing sore sheet to be updated', function() { +it('allows an existing sore sheet to be updated', function () { // Arrange loadSampleAudition(); $judge = User::factory()->create(); diff --git a/tests/Feature/Actions/RankAuditionEntriesTest.php b/tests-old/Feature/Actions/RankAuditionEntriesTest.php similarity index 92% rename from tests/Feature/Actions/RankAuditionEntriesTest.php rename to tests-old/Feature/Actions/RankAuditionEntriesTest.php index 8fdf1f6..95b4a41 100644 --- a/tests/Feature/Actions/RankAuditionEntriesTest.php +++ b/tests-old/Feature/Actions/RankAuditionEntriesTest.php @@ -1,6 +1,5 @@ rank('wrong', Audition::factory()->create()); })->throws(TabulationException::class, 'Mode must be seating or advancement'); it('throws an exception if an invalid audition is provided', function () { // Arrange - #$ranker = new RankAuditionEntries(new AllJudgesCount()); + //$ranker = new RankAuditionEntries(new AllJudgesCount()); $ranker = App::make(RankAuditionEntries::class); // Act & Assert $ranker->rank('seating', Audition::factory()->make()); @@ -29,7 +28,7 @@ it('includes all entries of the given mode in the return', function () { $audition = Audition::factory()->create(); $entries = Entry::factory()->seatingOnly()->count(10)->create(['audition_id' => $audition->id]); $otherEntries = Entry::factory()->advanceOnly()->count(10)->create(['audition_id' => $audition->id]); - #$ranker = new RankAuditionEntries(new AllJudgesCount()); + //$ranker = new RankAuditionEntries(new AllJudgesCount()); $ranker = App::make(RankAuditionEntries::class); // Act $return = $ranker->rank('seating', $audition); diff --git a/tests/Feature/Actions/RecordHistoricalSeatsTest.php b/tests-old/Feature/Actions/RecordHistoricalSeatsTest.php similarity index 100% rename from tests/Feature/Actions/RecordHistoricalSeatsTest.php rename to tests-old/Feature/Actions/RecordHistoricalSeatsTest.php diff --git a/tests/Feature/Actions/SetHeadDirectorTest.php b/tests-old/Feature/Actions/SetHeadDirectorTest.php similarity index 100% rename from tests/Feature/Actions/SetHeadDirectorTest.php rename to tests-old/Feature/Actions/SetHeadDirectorTest.php diff --git a/tests/Feature/Actions/UpdateEntryTest.php b/tests-old/Feature/Actions/UpdateEntryTest.php similarity index 100% rename from tests/Feature/Actions/UpdateEntryTest.php rename to tests-old/Feature/Actions/UpdateEntryTest.php diff --git a/tests/Feature/Models/AuditionFlagTest.php b/tests-old/Feature/Models/AuditionFlagTest.php similarity index 100% rename from tests/Feature/Models/AuditionFlagTest.php rename to tests-old/Feature/Models/AuditionFlagTest.php diff --git a/tests/Feature/Models/AuditionTest.php b/tests-old/Feature/Models/AuditionTest.php similarity index 100% rename from tests/Feature/Models/AuditionTest.php rename to tests-old/Feature/Models/AuditionTest.php diff --git a/tests/Feature/Models/EnsembleTest.php b/tests-old/Feature/Models/EnsembleTest.php similarity index 100% rename from tests/Feature/Models/EnsembleTest.php rename to tests-old/Feature/Models/EnsembleTest.php diff --git a/tests/Feature/Models/EntryFlagTest.php b/tests-old/Feature/Models/EntryFlagTest.php similarity index 100% rename from tests/Feature/Models/EntryFlagTest.php rename to tests-old/Feature/Models/EntryFlagTest.php diff --git a/tests/Feature/Models/EntryTest.php b/tests-old/Feature/Models/EntryTest.php similarity index 100% rename from tests/Feature/Models/EntryTest.php rename to tests-old/Feature/Models/EntryTest.php diff --git a/tests/Feature/Models/EventTest.php b/tests-old/Feature/Models/EventTest.php similarity index 95% rename from tests/Feature/Models/EventTest.php rename to tests-old/Feature/Models/EventTest.php index a97f644..e7421cd 100644 --- a/tests/Feature/Models/EventTest.php +++ b/tests-old/Feature/Models/EventTest.php @@ -9,7 +9,7 @@ uses(RefreshDatabase::class); it('has auditions', function () { $event = Event::factory()->create(); - Audition::factory()->create(['event_id' => $event->id, 'name' => 'Digereedoo','score_order' => 0]); + Audition::factory()->create(['event_id' => $event->id, 'name' => 'Digereedoo', 'score_order' => 0]); Audition::factory()->count(7)->create(['event_id' => $event->id]); expect($event->auditions->count())->toBe(8) diff --git a/tests/Feature/Models/JudgeAdvancementVoteTest.php b/tests-old/Feature/Models/JudgeAdvancementVoteTest.php similarity index 100% rename from tests/Feature/Models/JudgeAdvancementVoteTest.php rename to tests-old/Feature/Models/JudgeAdvancementVoteTest.php diff --git a/tests/Feature/Models/RoomTest.php b/tests-old/Feature/Models/RoomTest.php similarity index 100% rename from tests/Feature/Models/RoomTest.php rename to tests-old/Feature/Models/RoomTest.php diff --git a/tests/Feature/Models/RoomUserTest.php b/tests-old/Feature/Models/RoomUserTest.php similarity index 100% rename from tests/Feature/Models/RoomUserTest.php rename to tests-old/Feature/Models/RoomUserTest.php diff --git a/tests/Feature/Models/SchoolEmailDomainTest.php b/tests-old/Feature/Models/SchoolEmailDomainTest.php similarity index 100% rename from tests/Feature/Models/SchoolEmailDomainTest.php rename to tests-old/Feature/Models/SchoolEmailDomainTest.php diff --git a/tests/Feature/Models/SchoolTest.php b/tests-old/Feature/Models/SchoolTest.php similarity index 100% rename from tests/Feature/Models/SchoolTest.php rename to tests-old/Feature/Models/SchoolTest.php diff --git a/tests/Feature/Models/ScoreSheetTest.php b/tests-old/Feature/Models/ScoreSheetTest.php similarity index 100% rename from tests/Feature/Models/ScoreSheetTest.php rename to tests-old/Feature/Models/ScoreSheetTest.php diff --git a/tests/Feature/Models/ScoringGuideTest.php b/tests-old/Feature/Models/ScoringGuideTest.php similarity index 100% rename from tests/Feature/Models/ScoringGuideTest.php rename to tests-old/Feature/Models/ScoringGuideTest.php diff --git a/tests/Feature/Models/SeatTest.php b/tests-old/Feature/Models/SeatTest.php similarity index 100% rename from tests/Feature/Models/SeatTest.php rename to tests-old/Feature/Models/SeatTest.php diff --git a/tests/Feature/Models/SeatingLimitTest.php b/tests-old/Feature/Models/SeatingLimitTest.php similarity index 91% rename from tests/Feature/Models/SeatingLimitTest.php rename to tests-old/Feature/Models/SeatingLimitTest.php index ee4548c..e1e195d 100644 --- a/tests/Feature/Models/SeatingLimitTest.php +++ b/tests-old/Feature/Models/SeatingLimitTest.php @@ -19,7 +19,7 @@ beforeEach(function () { it('has an audition', function () { expect($this->seatingLimit->audition->name)->toBe($this->audition->name) - ->and($this->seatingLimit)->toBeInstanceOf(SeatingLimit::class); + ->and($this->seatingLimit)->toBeInstanceOf(SeatingLimit::class); }); it('has an ensemble', function () { diff --git a/tests/Feature/Models/StudentTest.php b/tests-old/Feature/Models/StudentTest.php similarity index 100% rename from tests/Feature/Models/StudentTest.php rename to tests-old/Feature/Models/StudentTest.php diff --git a/tests/Feature/Models/UserTest.php b/tests-old/Feature/Models/UserTest.php similarity index 100% rename from tests/Feature/Models/UserTest.php rename to tests-old/Feature/Models/UserTest.php diff --git a/tests/Feature/Pages/Admin/DashboardTest.php b/tests-old/Feature/Pages/Admin/DashboardTest.php similarity index 99% rename from tests/Feature/Pages/Admin/DashboardTest.php rename to tests-old/Feature/Pages/Admin/DashboardTest.php index 1b4435a..151bf20 100644 --- a/tests/Feature/Pages/Admin/DashboardTest.php +++ b/tests-old/Feature/Pages/Admin/DashboardTest.php @@ -2,6 +2,7 @@ use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; + use function Pest\Laravel\actingAs; use function Pest\Laravel\get; diff --git a/tests/Feature/Pages/Admin/EntiesCreateTest.php b/tests-old/Feature/Pages/Admin/EntiesCreateTest.php similarity index 100% rename from tests/Feature/Pages/Admin/EntiesCreateTest.php rename to tests-old/Feature/Pages/Admin/EntiesCreateTest.php diff --git a/tests/Feature/Pages/Admin/EntriesEditTest.php b/tests-old/Feature/Pages/Admin/EntriesEditTest.php similarity index 100% rename from tests/Feature/Pages/Admin/EntriesEditTest.php rename to tests-old/Feature/Pages/Admin/EntriesEditTest.php diff --git a/tests/Feature/Pages/Admin/EntriesIndexFiltersTest.php b/tests-old/Feature/Pages/Admin/EntriesIndexFiltersTest.php similarity index 100% rename from tests/Feature/Pages/Admin/EntriesIndexFiltersTest.php rename to tests-old/Feature/Pages/Admin/EntriesIndexFiltersTest.php diff --git a/tests/Feature/Pages/Admin/EntriesIndexTest.php b/tests-old/Feature/Pages/Admin/EntriesIndexTest.php similarity index 100% rename from tests/Feature/Pages/Admin/EntriesIndexTest.php rename to tests-old/Feature/Pages/Admin/EntriesIndexTest.php diff --git a/tests/Feature/Pages/Admin/PrintSigninSheetsTest.php b/tests-old/Feature/Pages/Admin/PrintSigninSheetsTest.php similarity index 100% rename from tests/Feature/Pages/Admin/PrintSigninSheetsTest.php rename to tests-old/Feature/Pages/Admin/PrintSigninSheetsTest.php diff --git a/tests/Feature/Pages/Admin/SchoolsCreateTest.php b/tests-old/Feature/Pages/Admin/SchoolsCreateTest.php similarity index 99% rename from tests/Feature/Pages/Admin/SchoolsCreateTest.php rename to tests-old/Feature/Pages/Admin/SchoolsCreateTest.php index 5420d16..5eae739 100644 --- a/tests/Feature/Pages/Admin/SchoolsCreateTest.php +++ b/tests-old/Feature/Pages/Admin/SchoolsCreateTest.php @@ -3,6 +3,7 @@ use App\Models\School; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; + use function Pest\Laravel\actingAs; use function Pest\Laravel\get; use function Pest\Laravel\post; diff --git a/tests/Feature/Pages/Admin/SchoolsEditTest.php b/tests-old/Feature/Pages/Admin/SchoolsEditTest.php similarity index 100% rename from tests/Feature/Pages/Admin/SchoolsEditTest.php rename to tests-old/Feature/Pages/Admin/SchoolsEditTest.php diff --git a/tests/Feature/Pages/Admin/SchoolsIndexTest.php b/tests-old/Feature/Pages/Admin/SchoolsIndexTest.php similarity index 95% rename from tests/Feature/Pages/Admin/SchoolsIndexTest.php rename to tests-old/Feature/Pages/Admin/SchoolsIndexTest.php index d7d8e9a..a289933 100644 --- a/tests/Feature/Pages/Admin/SchoolsIndexTest.php +++ b/tests-old/Feature/Pages/Admin/SchoolsIndexTest.php @@ -4,12 +4,11 @@ use App\Models\Entry; use App\Models\School; use App\Models\Student; use App\Models\User; -use App\Services\EntryService; use App\Services\Invoice\InvoiceOneFeePerEntry; use App\Settings; use Illuminate\Foundation\Testing\RefreshDatabase; - use Illuminate\Support\Facades\App; + use function Pest\Laravel\actingAs; use function Pest\Laravel\get; @@ -65,7 +64,7 @@ it('has a new school link', function () { }); it('shows school data', function () { // Arrange - #$invoiceDataService = new App\Services\Invoice\InvoiceOneFeePerEntry(new App\Services\EntryService(new App\Services\AuditionService())); + //$invoiceDataService = new App\Services\Invoice\InvoiceOneFeePerEntry(new App\Services\EntryService(new App\Services\AuditionService())); $invoiceDataService = App::make(InvoiceOneFeePerEntry::class); Settings::set('school_fees', 1000); Settings::set('late_fee', 2500); diff --git a/tests/Feature/Pages/Admin/SchoolsShowTest.php b/tests-old/Feature/Pages/Admin/SchoolsShowTest.php similarity index 99% rename from tests/Feature/Pages/Admin/SchoolsShowTest.php rename to tests-old/Feature/Pages/Admin/SchoolsShowTest.php index 126b563..c187b97 100644 --- a/tests/Feature/Pages/Admin/SchoolsShowTest.php +++ b/tests-old/Feature/Pages/Admin/SchoolsShowTest.php @@ -1,6 +1,5 @@ id]['seatsPublished'] === true; }); }); -it('shows seating auditions', function() { +it('shows seating auditions', function () { $audition = Audition::factory()->create(); actAsAdmin(); get(route('seating.status')) ->assertOk() ->assertSee($audition->name); }); -it('does not show advancement only auditions', function() { +it('does not show advancement only auditions', function () { $audition = Audition::factory()->advancementOnly()->create(); actAsAdmin(); get(route('seating.status')) diff --git a/tests/Feature/Pages/Setup/AuditionsCreateTest.php b/tests-old/Feature/Pages/Setup/AuditionsCreateTest.php similarity index 100% rename from tests/Feature/Pages/Setup/AuditionsCreateTest.php rename to tests-old/Feature/Pages/Setup/AuditionsCreateTest.php diff --git a/tests/Feature/Pages/Setup/AuditionsEditTest.php b/tests-old/Feature/Pages/Setup/AuditionsEditTest.php similarity index 100% rename from tests/Feature/Pages/Setup/AuditionsEditTest.php rename to tests-old/Feature/Pages/Setup/AuditionsEditTest.php diff --git a/tests/Feature/Pages/Setup/AuditionsIndexTest.php b/tests-old/Feature/Pages/Setup/AuditionsIndexTest.php similarity index 100% rename from tests/Feature/Pages/Setup/AuditionsIndexTest.php rename to tests-old/Feature/Pages/Setup/AuditionsIndexTest.php diff --git a/tests/Feature/Pages/Setup/BonusScoreIndexTest.php b/tests-old/Feature/Pages/Setup/BonusScoreIndexTest.php similarity index 100% rename from tests/Feature/Pages/Setup/BonusScoreIndexTest.php rename to tests-old/Feature/Pages/Setup/BonusScoreIndexTest.php diff --git a/tests/Feature/Pages/Setup/BonusScoreJudgesTest.php b/tests-old/Feature/Pages/Setup/BonusScoreJudgesTest.php similarity index 100% rename from tests/Feature/Pages/Setup/BonusScoreJudgesTest.php rename to tests-old/Feature/Pages/Setup/BonusScoreJudgesTest.php diff --git a/tests/Feature/Pages/Setup/DrawEditTest.php b/tests-old/Feature/Pages/Setup/DrawEditTest.php similarity index 98% rename from tests/Feature/Pages/Setup/DrawEditTest.php rename to tests-old/Feature/Pages/Setup/DrawEditTest.php index 1bd3dae..f05da7b 100644 --- a/tests/Feature/Pages/Setup/DrawEditTest.php +++ b/tests-old/Feature/Pages/Setup/DrawEditTest.php @@ -3,7 +3,6 @@ use App\Models\Audition; use App\Models\Entry; use Illuminate\Foundation\Testing\RefreshDatabase; -use Illuminate\Support\Facades\Log; uses(RefreshDatabase::class); diff --git a/tests/Feature/Pages/Setup/DrawIndexTest.php b/tests-old/Feature/Pages/Setup/DrawIndexTest.php similarity index 100% rename from tests/Feature/Pages/Setup/DrawIndexTest.php rename to tests-old/Feature/Pages/Setup/DrawIndexTest.php diff --git a/tests/Feature/Pages/Setup/DrawStoreTest.php b/tests-old/Feature/Pages/Setup/DrawStoreTest.php similarity index 98% rename from tests/Feature/Pages/Setup/DrawStoreTest.php rename to tests-old/Feature/Pages/Setup/DrawStoreTest.php index 44cfe60..725c23b 100644 --- a/tests/Feature/Pages/Setup/DrawStoreTest.php +++ b/tests-old/Feature/Pages/Setup/DrawStoreTest.php @@ -78,7 +78,7 @@ it('sets the draw_number column on each entry in the audition based on the rando // Arrange $audition = Audition::factory()->hasEntries(10)->create(); Entry::all()->each(fn ($entry) => expect($entry->draw_number)->toBeNull()); - #$drawService = new DrawService(); + //$drawService = new DrawService(); $drawService = App::make(DrawService::class); $drawService->runOneDraw($audition); // Act & Assert @@ -88,7 +88,7 @@ it('only sets draw numbers in the specified audition', function () { // Arrange $audition = Audition::factory()->hasEntries(10)->create(); $bonusEntry = Entry::factory()->create(); - #$drawService = new DrawService(); + //$drawService = new DrawService(); $drawService = App::make(DrawService::class); $drawService->runOneDraw($audition); // Act & Assert diff --git a/tests/Feature/Pages/Setup/EnsemblesIndexTest.php b/tests-old/Feature/Pages/Setup/EnsemblesIndexTest.php similarity index 100% rename from tests/Feature/Pages/Setup/EnsemblesIndexTest.php rename to tests-old/Feature/Pages/Setup/EnsemblesIndexTest.php diff --git a/tests/Feature/Pages/Setup/EventsTest.php b/tests-old/Feature/Pages/Setup/EventsTest.php similarity index 100% rename from tests/Feature/Pages/Setup/EventsTest.php rename to tests-old/Feature/Pages/Setup/EventsTest.php diff --git a/tests/Feature/Pages/Setup/JudgingIndexTest.php b/tests-old/Feature/Pages/Setup/JudgingIndexTest.php similarity index 100% rename from tests/Feature/Pages/Setup/JudgingIndexTest.php rename to tests-old/Feature/Pages/Setup/JudgingIndexTest.php diff --git a/tests/Feature/Pages/Setup/RoomsIndexTest.php b/tests-old/Feature/Pages/Setup/RoomsIndexTest.php similarity index 100% rename from tests/Feature/Pages/Setup/RoomsIndexTest.php rename to tests-old/Feature/Pages/Setup/RoomsIndexTest.php diff --git a/tests/Feature/Pages/Setup/ScoringGuideEditDetailsTest.php b/tests-old/Feature/Pages/Setup/ScoringGuideEditDetailsTest.php similarity index 100% rename from tests/Feature/Pages/Setup/ScoringGuideEditDetailsTest.php rename to tests-old/Feature/Pages/Setup/ScoringGuideEditDetailsTest.php diff --git a/tests/Feature/Pages/Setup/ScoringGuideIndexTest.php b/tests-old/Feature/Pages/Setup/ScoringGuideIndexTest.php similarity index 100% rename from tests/Feature/Pages/Setup/ScoringGuideIndexTest.php rename to tests-old/Feature/Pages/Setup/ScoringGuideIndexTest.php diff --git a/tests/Feature/Pages/Setup/ScoringGuideOrderTabsTest.php b/tests-old/Feature/Pages/Setup/ScoringGuideOrderTabsTest.php similarity index 100% rename from tests/Feature/Pages/Setup/ScoringGuideOrderTabsTest.php rename to tests-old/Feature/Pages/Setup/ScoringGuideOrderTabsTest.php diff --git a/tests/Feature/Pages/Setup/SeatingLimitsTest.php b/tests-old/Feature/Pages/Setup/SeatingLimitsTest.php similarity index 100% rename from tests/Feature/Pages/Setup/SeatingLimitsTest.php rename to tests-old/Feature/Pages/Setup/SeatingLimitsTest.php diff --git a/tests/Feature/Pages/Setup/SettingsTest.php b/tests-old/Feature/Pages/Setup/SettingsTest.php similarity index 100% rename from tests/Feature/Pages/Setup/SettingsTest.php rename to tests-old/Feature/Pages/Setup/SettingsTest.php diff --git a/tests/Feature/Pages/StudentsEditTest.php b/tests-old/Feature/Pages/StudentsEditTest.php similarity index 100% rename from tests/Feature/Pages/StudentsEditTest.php rename to tests-old/Feature/Pages/StudentsEditTest.php diff --git a/tests/Feature/Pages/StudentsIndexTest.php b/tests-old/Feature/Pages/StudentsIndexTest.php similarity index 100% rename from tests/Feature/Pages/StudentsIndexTest.php rename to tests-old/Feature/Pages/StudentsIndexTest.php diff --git a/tests/Feature/Pages/Tabulation/enterScoreEntryFormTest.php b/tests-old/Feature/Pages/Tabulation/enterScoreEntryFormTest.php similarity index 100% rename from tests/Feature/Pages/Tabulation/enterScoreEntryFormTest.php rename to tests-old/Feature/Pages/Tabulation/enterScoreEntryFormTest.php diff --git a/tests/Feature/Pages/Tabulation/enterScoreSelectTest.php b/tests-old/Feature/Pages/Tabulation/enterScoreSelectTest.php similarity index 100% rename from tests/Feature/Pages/Tabulation/enterScoreSelectTest.php rename to tests-old/Feature/Pages/Tabulation/enterScoreSelectTest.php diff --git a/tests/Feature/Pages/Tabulation/noShowConfirmTest.php b/tests-old/Feature/Pages/Tabulation/noShowConfirmTest.php similarity index 94% rename from tests/Feature/Pages/Tabulation/noShowConfirmTest.php rename to tests-old/Feature/Pages/Tabulation/noShowConfirmTest.php index 1a7c340..5713576 100644 --- a/tests/Feature/Pages/Tabulation/noShowConfirmTest.php +++ b/tests-old/Feature/Pages/Tabulation/noShowConfirmTest.php @@ -86,12 +86,12 @@ it('posts to entry-flags.undoNoShow and has a remove button if the entry is alre it('shows a box with scores if the entry is scored', function () { // Arrange $judges = User::factory()->count(3)->create(); - $room = Room::factory()->create(); - $judges->each(fn($judge) => $room->addJudge($judge->id)); + $room = Room::factory()->create(); + $judges->each(fn ($judge) => $room->addJudge($judge->id)); $scoringGuide = ScoringGuide::factory()->create(); SubscoreDefinition::factory()->count(5)->create(['scoring_guide_id' => $scoringGuide->id]); $audition = Audition::factory()->create(['room_id' => $room->id, 'scoring_guide_id' => $scoringGuide->id]); - $entry = Entry::factory()->create(['audition_id' => $audition->id]); + $entry = Entry::factory()->create(['audition_id' => $audition->id]); // Run the ScoreAllAuditions seeder Artisan::call('db:seed', ['--class' => 'ScoreAllAuditions']); // Act & Assert @@ -100,6 +100,6 @@ it('shows a box with scores if the entry is scored', function () { $response->assertOk() ->assertSee('WARNING') ->assertSee('existing scores'); - $judges->each(fn($judge) => $response->assertSee($judge->full_name())); + $judges->each(fn ($judge) => $response->assertSee($judge->full_name())); }); diff --git a/tests/Feature/Pages/Tabulation/noShowEnterTest.php b/tests-old/Feature/Pages/Tabulation/noShowEnterTest.php similarity index 100% rename from tests/Feature/Pages/Tabulation/noShowEnterTest.php rename to tests-old/Feature/Pages/Tabulation/noShowEnterTest.php diff --git a/tests/Feature/Pages/Tabulation/noShowSelectTest.php b/tests-old/Feature/Pages/Tabulation/noShowSelectTest.php similarity index 100% rename from tests/Feature/Pages/Tabulation/noShowSelectTest.php rename to tests-old/Feature/Pages/Tabulation/noShowSelectTest.php diff --git a/tests/Feature/Pages/Tabulation/noShowUndoTest.php b/tests-old/Feature/Pages/Tabulation/noShowUndoTest.php similarity index 100% rename from tests/Feature/Pages/Tabulation/noShowUndoTest.php rename to tests-old/Feature/Pages/Tabulation/noShowUndoTest.php diff --git a/tests/Feature/Services/AuditionServiceTest.php b/tests-old/Feature/Services/AuditionServiceTest.php similarity index 100% rename from tests/Feature/Services/AuditionServiceTest.php rename to tests-old/Feature/Services/AuditionServiceTest.php diff --git a/tests/Feature/Services/DoublerServiceTest.php b/tests-old/Feature/Services/DoublerServiceTest.php similarity index 100% rename from tests/Feature/Services/DoublerServiceTest.php rename to tests-old/Feature/Services/DoublerServiceTest.php diff --git a/tests/Feature/Services/EntryServiceTest.php b/tests-old/Feature/Services/EntryServiceTest.php similarity index 91% rename from tests/Feature/Services/EntryServiceTest.php rename to tests-old/Feature/Services/EntryServiceTest.php index f26245f..847f2db 100644 --- a/tests/Feature/Services/EntryServiceTest.php +++ b/tests-old/Feature/Services/EntryServiceTest.php @@ -9,11 +9,11 @@ use Illuminate\Support\Facades\App; uses(RefreshDatabase::class); -beforeEach(function() { +beforeEach(function () { $this->entryService = App::make(EntryService::class); }); -it('checks if an entry is late', function() { +it('checks if an entry is late', function () { $openAudition = Audition::factory()->create(['entry_deadline' => Carbon::tomorrow()]); $closedAudition = Audition::factory()->create(['entry_deadline' => Carbon::yesterday()]); diff --git a/tests/Feature/Services/ScoreServiceTest.php b/tests-old/Feature/Services/ScoreServiceTest.php similarity index 96% rename from tests/Feature/Services/ScoreServiceTest.php rename to tests-old/Feature/Services/ScoreServiceTest.php index df9d3e3..eebe065 100644 --- a/tests/Feature/Services/ScoreServiceTest.php +++ b/tests-old/Feature/Services/ScoreServiceTest.php @@ -12,7 +12,7 @@ use Illuminate\Support\Facades\App; uses(RefreshDatabase::class); beforeEach(function () { - #$this->scoreService = new ScoreService(); + //$this->scoreService = new ScoreService(); $this->scoreService = App::make(ScoreService::class); }); diff --git a/tests/Feature/Services/UserServiceTest.php b/tests-old/Feature/Services/UserServiceTest.php similarity index 51% rename from tests/Feature/Services/UserServiceTest.php rename to tests-old/Feature/Services/UserServiceTest.php index bab8fe8..56f0e1e 100644 --- a/tests/Feature/Services/UserServiceTest.php +++ b/tests-old/Feature/Services/UserServiceTest.php @@ -7,13 +7,13 @@ use Illuminate\Support\Facades\App; uses(RefreshDatabase::class); -beforeEach(function() { - $this->userService = App::make(UserService::class); +beforeEach(function () { + $this->userService = App::make(UserService::class); }); -it('checks if a user exists', function() { +it('checks if a user exists', function () { $realUser = User::factory()->create(); $fakeUser = User::factory()->make(); - expect ($this->userService->userExists($realUser))->toBeTrue(); - expect ($this->userService->userExists($fakeUser))->toBeFalse(); + expect($this->userService->userExists($realUser))->toBeTrue(); + expect($this->userService->userExists($fakeUser))->toBeFalse(); });