test: Add unit tests for various enum classes.
This commit is contained in:
parent
78e3809e7b
commit
9ac837f354
27
tests/Unit/Enums/AnnouncementTypeTest.php
Normal file
27
tests/Unit/Enums/AnnouncementTypeTest.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\AnnouncementType;
|
||||
|
||||
test('announcement type enum has expected cases', function () {
|
||||
expect(AnnouncementType::cases())->toHaveCount(2);
|
||||
});
|
||||
|
||||
test('announcement type enum labels and colors', function (AnnouncementType $type, string $label, string $color) {
|
||||
expect($type->getLabel())->toBe($label);
|
||||
expect($type->getColor())->toBe($color);
|
||||
})->with([
|
||||
[AnnouncementType::PUBLIC, 'Publik', 'info'],
|
||||
[AnnouncementType::COMPANY, 'Perusahaan', 'warning'],
|
||||
]);
|
||||
|
||||
test('announcement type enum options', function () {
|
||||
expect(AnnouncementType::options())->toEqual([
|
||||
1 => 'Publik',
|
||||
2 => 'Perusahaan',
|
||||
]);
|
||||
});
|
||||
|
||||
test('announcement type enum values and comment', function () {
|
||||
expect(AnnouncementType::values())->toEqual([1, 2]);
|
||||
expect(AnnouncementType::comment())->toBe('1: Publik, 2: Perusahaan');
|
||||
});
|
||||
29
tests/Unit/Enums/ApprovalStatusTest.php
Normal file
29
tests/Unit/Enums/ApprovalStatusTest.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\ApprovalStatus;
|
||||
|
||||
test('approval status enum has expected cases', function () {
|
||||
expect(ApprovalStatus::cases())->toHaveCount(3);
|
||||
});
|
||||
|
||||
test('approval status enum labels and colors', function (ApprovalStatus $status, string $label, string $color) {
|
||||
expect($status->getLabel())->toBe($label);
|
||||
expect($status->getColor())->toBe($color);
|
||||
})->with([
|
||||
[ApprovalStatus::PENDING, 'Menunggu', 'warning'],
|
||||
[ApprovalStatus::ACCEPTED, 'Menerima', 'success'],
|
||||
[ApprovalStatus::REJECTED, 'Menolak', 'danger'],
|
||||
]);
|
||||
|
||||
test('approval status enum options', function () {
|
||||
expect(ApprovalStatus::options())->toEqual([
|
||||
1 => 'Menunggu',
|
||||
2 => 'Menerima',
|
||||
3 => 'Menolak',
|
||||
]);
|
||||
});
|
||||
|
||||
test('approval status enum values and comment', function () {
|
||||
expect(ApprovalStatus::values())->toEqual([1, 2, 3]);
|
||||
expect(ApprovalStatus::comment())->toBe('1: Menunggu, 2: Menerima, 3: Menolak');
|
||||
});
|
||||
37
tests/Unit/Enums/ChannelTest.php
Normal file
37
tests/Unit/Enums/ChannelTest.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\Channel;
|
||||
|
||||
test('channel enum has expected cases', function () {
|
||||
expect(Channel::cases())->toHaveCount(7);
|
||||
});
|
||||
|
||||
test('channel enum labels and colors', function (Channel $channel, string $label, string $color) {
|
||||
expect($channel->getLabel())->toBe($label);
|
||||
expect($channel->getColor())->toBe($color);
|
||||
})->with([
|
||||
[Channel::WEBSITE, 'Website', 'info'],
|
||||
[Channel::TIKTOK, 'Tiktok', 'success'],
|
||||
[Channel::YOUTUBE, 'Youtube', 'warning'],
|
||||
[Channel::FACEBOOK, 'Facebook', 'danger'],
|
||||
[Channel::INSTAGRAM, 'Instagram', 'primary'],
|
||||
[Channel::TWITTER, 'Twitter', 'secondary'],
|
||||
[Channel::OTHER, 'Other', 'gray'],
|
||||
]);
|
||||
|
||||
test('channel enum options', function () {
|
||||
expect(Channel::options())->toEqual([
|
||||
1 => 'Website',
|
||||
2 => 'Tiktok',
|
||||
3 => 'Youtube',
|
||||
4 => 'Facebook',
|
||||
5 => 'Instagram',
|
||||
6 => 'Twitter',
|
||||
7 => 'Other',
|
||||
]);
|
||||
});
|
||||
|
||||
test('channel enum values and comment', function () {
|
||||
expect(Channel::values())->toEqual([1, 2, 3, 4, 5, 6, 7]);
|
||||
expect(Channel::comment())->toBe('1: Website, 2: Tiktok, 3: Youtube, 4: Facebook, 5: Instagram, 6: Twitter, 7: Other');
|
||||
});
|
||||
31
tests/Unit/Enums/ContentTypeTest.php
Normal file
31
tests/Unit/Enums/ContentTypeTest.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\ContentType;
|
||||
|
||||
test('content type enum has expected cases', function () {
|
||||
expect(ContentType::cases())->toHaveCount(4);
|
||||
});
|
||||
|
||||
test('content type enum labels and colors', function (ContentType $type, string $label, string $color) {
|
||||
expect($type->getLabel())->toBe($label);
|
||||
expect($type->getColor())->toBe($color);
|
||||
})->with([
|
||||
[ContentType::FOTO, 'Foto', 'info'],
|
||||
[ContentType::TEXT, 'Teks', 'success'],
|
||||
[ContentType::GRAPHIC, 'Grafis', 'warning'],
|
||||
[ContentType::VIDEO, 'Video', 'danger'],
|
||||
]);
|
||||
|
||||
test('content type enum options', function () {
|
||||
expect(ContentType::options())->toEqual([
|
||||
1 => 'Foto',
|
||||
2 => 'Teks',
|
||||
3 => 'Grafis',
|
||||
4 => 'Video',
|
||||
]);
|
||||
});
|
||||
|
||||
test('content type enum values and comment', function () {
|
||||
expect(ContentType::values())->toEqual([1, 2, 3, 4]);
|
||||
expect(ContentType::comment())->toBe('1: Foto, 2: Teks, 3: Grafis, 4: Video');
|
||||
});
|
||||
33
tests/Unit/Enums/CooperationStatusTest.php
Normal file
33
tests/Unit/Enums/CooperationStatusTest.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\CooperationStatus;
|
||||
|
||||
test('cooperation status enum has expected cases', function () {
|
||||
expect(CooperationStatus::cases())->toHaveCount(5);
|
||||
});
|
||||
|
||||
test('cooperation status enum labels and colors', function (CooperationStatus $status, string $label, string $color) {
|
||||
expect($status->getLabel())->toBe($label);
|
||||
expect($status->getColor())->toBe($color);
|
||||
})->with([
|
||||
[CooperationStatus::PENDING, 'Menunggu', 'warning'],
|
||||
[CooperationStatus::ASSIGNMENT, 'Penugasan', 'info'],
|
||||
[CooperationStatus::VERIFICATION, 'Verifikasi', 'primary'],
|
||||
[CooperationStatus::PAYMENT, 'Pembayaran', 'slate'],
|
||||
[CooperationStatus::COMPLETED, 'Selesai', 'success'],
|
||||
]);
|
||||
|
||||
test('cooperation status enum options', function () {
|
||||
expect(CooperationStatus::options())->toEqual([
|
||||
1 => 'Menunggu',
|
||||
2 => 'Penugasan',
|
||||
3 => 'Verifikasi',
|
||||
4 => 'Pembayaran',
|
||||
5 => 'Selesai',
|
||||
]);
|
||||
});
|
||||
|
||||
test('cooperation status enum values and comment', function () {
|
||||
expect(CooperationStatus::values())->toEqual([1, 2, 3, 4, 5]);
|
||||
expect(CooperationStatus::comment())->toBe('1: Menunggu, 2: Penugasan, 3: Verifikasi, 4: Pembayaran, 5: Selesai');
|
||||
});
|
||||
27
tests/Unit/Enums/DataChangeDecisionTest.php
Normal file
27
tests/Unit/Enums/DataChangeDecisionTest.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\DataChangeDecision;
|
||||
|
||||
test('data change decision enum has expected cases', function () {
|
||||
expect(DataChangeDecision::cases())->toHaveCount(2);
|
||||
});
|
||||
|
||||
test('data change decision enum labels and colors', function (DataChangeDecision $decision, string $label, string $color) {
|
||||
expect($decision->getLabel())->toBe($label);
|
||||
expect($decision->getColor())->toBe($color);
|
||||
})->with([
|
||||
[DataChangeDecision::APPROVED, 'Disetujui', 'success'],
|
||||
[DataChangeDecision::REJECTED, 'Ditolak', 'danger'],
|
||||
]);
|
||||
|
||||
test('data change decision enum options', function () {
|
||||
expect(DataChangeDecision::options())->toEqual([
|
||||
1 => 'Disetujui',
|
||||
2 => 'Ditolak',
|
||||
]);
|
||||
});
|
||||
|
||||
test('data change decision enum values and comment', function () {
|
||||
expect(DataChangeDecision::values())->toEqual([1, 2]);
|
||||
expect(DataChangeDecision::comment())->toBe('1: Disetujui, 2: Ditolak');
|
||||
});
|
||||
29
tests/Unit/Enums/DataChangeStatusTest.php
Normal file
29
tests/Unit/Enums/DataChangeStatusTest.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\DataChangeStatus;
|
||||
|
||||
test('data change status enum has expected cases', function () {
|
||||
expect(DataChangeStatus::cases())->toHaveCount(3);
|
||||
});
|
||||
|
||||
test('data change status enum labels and colors', function (DataChangeStatus $status, string $label, string $color) {
|
||||
expect($status->getLabel())->toBe($label);
|
||||
expect($status->getColor())->toBe($color);
|
||||
})->with([
|
||||
[DataChangeStatus::PENDING, 'Menunggu Verifikasi', 'warning'],
|
||||
[DataChangeStatus::APPROVED, 'Disetujui', 'success'],
|
||||
[DataChangeStatus::REJECTED, 'Ditolak', 'danger'],
|
||||
]);
|
||||
|
||||
test('data change status enum options', function () {
|
||||
expect(DataChangeStatus::options())->toEqual([
|
||||
1 => 'Menunggu Verifikasi',
|
||||
2 => 'Disetujui',
|
||||
3 => 'Ditolak',
|
||||
]);
|
||||
});
|
||||
|
||||
test('data change status enum values and comment', function () {
|
||||
expect(DataChangeStatus::values())->toEqual([1, 2, 3]);
|
||||
expect(DataChangeStatus::comment())->toBe('1: Menunggu Verifikasi, 2: Disetujui, 3: Ditolak');
|
||||
});
|
||||
29
tests/Unit/Enums/DecisionAdminTest.php
Normal file
29
tests/Unit/Enums/DecisionAdminTest.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\DecisionAdmin;
|
||||
|
||||
test('decision admin enum has expected cases', function () {
|
||||
expect(DecisionAdmin::cases())->toHaveCount(3);
|
||||
});
|
||||
|
||||
test('decision admin enum labels and colors', function (DecisionAdmin $decision, string $label, string $color) {
|
||||
expect($decision->getLabel())->toBe($label);
|
||||
expect($decision->getColor())->toBe($color);
|
||||
})->with([
|
||||
[DecisionAdmin::APPROVED, 'Disetujui', 'success'],
|
||||
[DecisionAdmin::NEED_REVISION, 'Perlu Revisi', 'info'],
|
||||
[DecisionAdmin::REJECTED, 'Ditolak', 'danger'],
|
||||
]);
|
||||
|
||||
test('decision admin enum options', function () {
|
||||
expect(DecisionAdmin::options())->toEqual([
|
||||
1 => 'Disetujui',
|
||||
2 => 'Perlu Revisi',
|
||||
3 => 'Ditolak',
|
||||
]);
|
||||
});
|
||||
|
||||
test('decision admin enum values and comment', function () {
|
||||
expect(DecisionAdmin::values())->toEqual([1, 2, 3]);
|
||||
expect(DecisionAdmin::comment())->toBe('1: Disetujui, 2: Perlu Revisi, 3: Ditolak');
|
||||
});
|
||||
39
tests/Unit/Enums/IsActiveTest.php
Normal file
39
tests/Unit/Enums/IsActiveTest.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\IsActive;
|
||||
|
||||
test('is active enum has expected cases', function () {
|
||||
expect(IsActive::cases())->toHaveCount(2);
|
||||
|
||||
expect(IsActive::ACTIVE->value)->toBe(1);
|
||||
expect(IsActive::INACTIVE->value)->toBe(2);
|
||||
});
|
||||
|
||||
test('is active enum has correct labels', function () {
|
||||
expect(IsActive::ACTIVE->getLabel())->toBe('Aktif');
|
||||
expect(IsActive::INACTIVE->getLabel())->toBe('Tidak Aktif');
|
||||
});
|
||||
|
||||
test('is active enum has correct colors', function () {
|
||||
expect(IsActive::ACTIVE->getColor())->toBe('success');
|
||||
expect(IsActive::INACTIVE->getColor())->toBe('danger');
|
||||
});
|
||||
|
||||
test('is active enum options method returns correct array', function () {
|
||||
$options = IsActive::options();
|
||||
|
||||
expect($options)->toBeArray()
|
||||
->toHaveCount(2)
|
||||
->toEqual([
|
||||
1 => 'Aktif',
|
||||
2 => 'Tidak Aktif',
|
||||
]);
|
||||
});
|
||||
|
||||
test('is active enum values method returns correct array', function () {
|
||||
expect(IsActive::values())->toEqual([1, 2]);
|
||||
});
|
||||
|
||||
test('is active enum comment method returns correct string', function () {
|
||||
expect(IsActive::comment())->toBe('1: Aktif, 2: Tidak Aktif');
|
||||
});
|
||||
32
tests/Unit/Enums/IssueSentimentTest.php
Normal file
32
tests/Unit/Enums/IssueSentimentTest.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\IssueSentiment;
|
||||
use Filament\Support\Colors\Color;
|
||||
|
||||
test('issue sentiment enum has expected cases', function () {
|
||||
expect(IssueSentiment::cases())->toHaveCount(4);
|
||||
});
|
||||
|
||||
test('issue sentiment enum labels and colors', function (IssueSentiment $sentiment, string $label, array $color) {
|
||||
expect($sentiment->getLabel())->toBe($label);
|
||||
expect($sentiment->getColor())->toBe($color);
|
||||
})->with([
|
||||
[IssueSentiment::POSITIVE, 'Positif', Color::Green],
|
||||
[IssueSentiment::NEGATIVE, 'Negatif', Color::Red],
|
||||
[IssueSentiment::NEUTRAL, 'Netral', Color::Gray],
|
||||
[IssueSentiment::CRISIS, 'Krisis', Color::Orange],
|
||||
]);
|
||||
|
||||
test('issue sentiment enum options', function () {
|
||||
expect(IssueSentiment::options())->toEqual([
|
||||
1 => 'Positif',
|
||||
2 => 'Negatif',
|
||||
3 => 'Netral',
|
||||
4 => 'Krisis',
|
||||
]);
|
||||
});
|
||||
|
||||
test('issue sentiment enum values and comment', function () {
|
||||
expect(IssueSentiment::values())->toEqual([1, 2, 3, 4]);
|
||||
expect(IssueSentiment::comment())->toBe('1: Positif, 2: Negatif, 3: Netral, 4: Krisis');
|
||||
});
|
||||
28
tests/Unit/Enums/MediaClassificationTest.php
Normal file
28
tests/Unit/Enums/MediaClassificationTest.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\MediaClassification;
|
||||
|
||||
test('media classification enum has expected cases', function () {
|
||||
expect(MediaClassification::cases())->toHaveCount(3);
|
||||
});
|
||||
|
||||
test('media classification enum labels', function (MediaClassification $classification, string $label) {
|
||||
expect($classification->getLabel())->toBe($label);
|
||||
})->with([
|
||||
[MediaClassification::LOCAL, 'Lokal'],
|
||||
[MediaClassification::REGIONAL, 'Regional'],
|
||||
[MediaClassification::NATIONAL, 'Nasional'],
|
||||
]);
|
||||
|
||||
test('media classification enum options', function () {
|
||||
expect(MediaClassification::options())->toEqual([
|
||||
1 => 'Lokal',
|
||||
2 => 'Regional',
|
||||
3 => 'Nasional',
|
||||
]);
|
||||
});
|
||||
|
||||
test('media classification enum values and comment', function () {
|
||||
expect(MediaClassification::values())->toEqual([1, 2, 3]);
|
||||
expect(MediaClassification::comment())->toBe('1: Lokal, 2: Regional, 3: Nasional');
|
||||
});
|
||||
30
tests/Unit/Enums/MediaTypeTest.php
Normal file
30
tests/Unit/Enums/MediaTypeTest.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\MediaType;
|
||||
|
||||
test('media type enum has expected cases', function () {
|
||||
expect(MediaType::cases())->toHaveCount(4);
|
||||
});
|
||||
|
||||
test('media type enum labels', function (MediaType $type, string $label) {
|
||||
expect($type->getLabel())->toBe($label);
|
||||
})->with([
|
||||
[MediaType::ONLINE, 'Online'],
|
||||
[MediaType::PRINT, 'Cetak'],
|
||||
[MediaType::RADIO, 'Radio'],
|
||||
[MediaType::TELEVISION, 'Televisi'],
|
||||
]);
|
||||
|
||||
test('media type enum options', function () {
|
||||
expect(MediaType::options())->toEqual([
|
||||
1 => 'Online',
|
||||
2 => 'Cetak',
|
||||
3 => 'Radio',
|
||||
4 => 'Televisi',
|
||||
]);
|
||||
});
|
||||
|
||||
test('media type enum values and comment', function () {
|
||||
expect(MediaType::values())->toEqual([1, 2, 3, 4]);
|
||||
expect(MediaType::comment())->toBe('1: Online, 2: Cetak, 3: Radio, 4: Televisi');
|
||||
});
|
||||
29
tests/Unit/Enums/NewsStatusTest.php
Normal file
29
tests/Unit/Enums/NewsStatusTest.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\NewsStatus;
|
||||
|
||||
test('news status enum has expected cases', function () {
|
||||
expect(NewsStatus::cases())->toHaveCount(3);
|
||||
});
|
||||
|
||||
test('news status enum labels and colors', function (NewsStatus $status, string $label, string $color) {
|
||||
expect($status->getLabel())->toBe($label);
|
||||
expect($status->getColor())->toBe($color);
|
||||
})->with([
|
||||
[NewsStatus::DRAFT, 'Draft', 'warning'],
|
||||
[NewsStatus::PUBLISHED, 'Publish', 'success'],
|
||||
[NewsStatus::ARCHIVED, 'Arsip', 'gray'],
|
||||
]);
|
||||
|
||||
test('news status enum options', function () {
|
||||
expect(NewsStatus::options())->toEqual([
|
||||
1 => 'Draft',
|
||||
2 => 'Publish',
|
||||
3 => 'Arsip',
|
||||
]);
|
||||
});
|
||||
|
||||
test('news status enum values and comment', function () {
|
||||
expect(NewsStatus::values())->toEqual([1, 2, 3]);
|
||||
expect(NewsStatus::comment())->toBe('1: Draft, 2: Publish, 3: Arsip');
|
||||
});
|
||||
40
tests/Unit/Enums/RoleEnumTest.php
Normal file
40
tests/Unit/Enums/RoleEnumTest.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\RoleEnum;
|
||||
|
||||
test('role enum has expected cases', function () {
|
||||
expect(RoleEnum::cases())->toHaveCount(6);
|
||||
});
|
||||
|
||||
test('role enum values', function (RoleEnum $role, string $value) {
|
||||
expect($role->value)->toBe($value);
|
||||
})->with([
|
||||
[RoleEnum::DEVELOPER, 'Developer'],
|
||||
[RoleEnum::ADMINISTRATOR, 'Administrator'],
|
||||
[RoleEnum::ADMIN_MONITORING, 'Admin Monitoring'],
|
||||
[RoleEnum::ADMIN_KONTEN, 'Admin Konten'],
|
||||
[RoleEnum::ADMIN_KEUANGAN, 'Admin Keuangan'],
|
||||
[RoleEnum::PERUSAHAAN, 'Perusahaan'],
|
||||
]);
|
||||
|
||||
test('role enum options', function () {
|
||||
expect(RoleEnum::options())->toEqual([
|
||||
'Developer' => 'Developer',
|
||||
'Administrator' => 'Administrator',
|
||||
'Admin Monitoring' => 'Admin Monitoring',
|
||||
'Admin Konten' => 'Admin Konten',
|
||||
'Admin Keuangan' => 'Admin Keuangan',
|
||||
'Perusahaan' => 'Perusahaan',
|
||||
]);
|
||||
});
|
||||
|
||||
test('role enum values method', function () {
|
||||
expect(RoleEnum::values())->toEqual([
|
||||
'Developer',
|
||||
'Administrator',
|
||||
'Admin Monitoring',
|
||||
'Admin Konten',
|
||||
'Admin Keuangan',
|
||||
'Perusahaan',
|
||||
]);
|
||||
});
|
||||
28
tests/Unit/Enums/SocialMediaTest.php
Normal file
28
tests/Unit/Enums/SocialMediaTest.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\SocialMedia;
|
||||
|
||||
test('social media enum has expected cases', function () {
|
||||
expect(SocialMedia::cases())->toHaveCount(3);
|
||||
});
|
||||
|
||||
test('social media enum labels', function (SocialMedia $media, string $label) {
|
||||
expect($media->getLabel())->toBe($label);
|
||||
})->with([
|
||||
[SocialMedia::PPID_DISKOMINFO_PURWAKARTA, 'PPID Diskominfo Purwakarta'],
|
||||
[SocialMedia::DISKOMINFO_PURWAKARTA, 'Diskominfo Purwakarta'],
|
||||
[SocialMedia::PURWAKARTA_SABER_HOAKS, 'Purwakarta Saber Hoaks'],
|
||||
]);
|
||||
|
||||
test('social media enum options', function () {
|
||||
expect(SocialMedia::options())->toEqual([
|
||||
1 => 'PPID Diskominfo Purwakarta',
|
||||
2 => 'Diskominfo Purwakarta',
|
||||
3 => 'Purwakarta Saber Hoaks',
|
||||
]);
|
||||
});
|
||||
|
||||
test('social media enum values and comment', function () {
|
||||
expect(SocialMedia::values())->toEqual([1, 2, 3]);
|
||||
expect(SocialMedia::comment())->toBe('1: PPID Diskominfo Purwakarta, 2: Diskominfo Purwakarta, 3: Purwakarta Saber Hoaks');
|
||||
});
|
||||
34
tests/Unit/Enums/VerificationStatusTest.php
Normal file
34
tests/Unit/Enums/VerificationStatusTest.php
Normal file
@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use App\Enums\VerificationStatus;
|
||||
|
||||
test('verification status enum has expected cases', function () {
|
||||
expect(VerificationStatus::cases())->toHaveCount(4);
|
||||
});
|
||||
|
||||
test('verification status enum labels and colors', function (VerificationStatus $status, string $label, string $color) {
|
||||
expect($status->getLabel())->toBe($label);
|
||||
expect($status->getColor())->toBe($color);
|
||||
})->with([
|
||||
[VerificationStatus::PENDING, 'Menunggu Verifikasi', 'warning'],
|
||||
[VerificationStatus::APPROVED, 'Disetujui', 'success'],
|
||||
[VerificationStatus::NEED_REVISION, 'Perlu Revisi', 'info'],
|
||||
[VerificationStatus::REJECTED, 'Ditolak', 'danger'],
|
||||
]);
|
||||
|
||||
test('verification status enum options method returns correct array', function () {
|
||||
expect(VerificationStatus::options())->toEqual([
|
||||
1 => 'Menunggu Verifikasi',
|
||||
2 => 'Disetujui',
|
||||
3 => 'Perlu Revisi',
|
||||
4 => 'Ditolak',
|
||||
]);
|
||||
});
|
||||
|
||||
test('verification status enum values method returns correct array', function () {
|
||||
expect(VerificationStatus::values())->toEqual([1, 2, 3, 4]);
|
||||
});
|
||||
|
||||
test('verification status enum comment method returns correct string', function () {
|
||||
expect(VerificationStatus::comment())->toBe('1: Menunggu Verifikasi, 2: Disetujui, 3: Perlu Revisi, 4: Ditolak');
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user