-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Revert "test: fix deprecation errors (#2351)" This reverts commit e04e0d5. * test: update datasets to work with pest v3
- Loading branch information
Showing
41 changed files
with
1,157 additions
and
1,157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,5 +33,5 @@ | |
]; | ||
} | ||
|
||
return array_map('array_values', $testCases); | ||
return $testCases; | ||
}); |
16 changes: 8 additions & 8 deletions
16
tests/Datasets/DestroyIndividualRequestValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
|
||
dataset('destroyIndividualRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Current password is missing' => [ | ||
return [ | ||
'Current password is missing' => fn () => [ | ||
'state' => ['current_password' => null], | ||
'errors' => fn () => ['current_password' => __('validation.required', ['attribute' => __('current password')])], | ||
'errors' => ['current_password' => __('validation.required', ['attribute' => __('current password')])], | ||
], | ||
'Current password is not a string' => [ | ||
'Current password is not a string' => fn () => [ | ||
'state' => ['current_password' => false], | ||
'errors' => fn () => ['current_password' => __('validation.string', ['attribute' => __('current password')])], | ||
'errors' => ['current_password' => __('validation.string', ['attribute' => __('current password')])], | ||
], | ||
'Current password does not match' => [ | ||
'Current password does not match' => fn () => [ | ||
'state' => ['current_password' => 'fake_password'], | ||
'errors' => fn () => ['current_password' => __('The provided password does not match your current password.')], | ||
'errors' => ['current_password' => __('The provided password does not match your current password.')], | ||
], | ||
]); | ||
]; | ||
}); |
16 changes: 8 additions & 8 deletions
16
tests/Datasets/DestroyOrganizationRequestValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
|
||
dataset('destroyOrganizationRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Current password is missing' => [ | ||
return [ | ||
'Current password is missing' => fn () => [ | ||
'state' => ['current_password' => null], | ||
'errors' => fn () => ['current_password' => __('validation.required', ['attribute' => __('current password')])], | ||
'errors' => ['current_password' => __('validation.required', ['attribute' => __('current password')])], | ||
], | ||
'Current password is not a string' => [ | ||
'Current password is not a string' => fn () => [ | ||
'state' => ['current_password' => false], | ||
'errors' => fn () => ['current_password' => __('validation.string', ['attribute' => __('current password')])], | ||
'errors' => ['current_password' => __('validation.string', ['attribute' => __('current password')])], | ||
], | ||
'Current password does not match' => [ | ||
'Current password does not match' => fn () => [ | ||
'state' => ['current_password' => 'fake_password'], | ||
'errors' => fn () => ['current_password' => __('validation.current_password', ['attribute' => __('current password')])], | ||
'errors' => ['current_password' => __('validation.current_password', ['attribute' => __('current password')])], | ||
], | ||
]); | ||
]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
|
||
dataset('destroyProjectRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Current password is missing' => [ | ||
return [ | ||
'Current password is missing' => fn () => [ | ||
'state' => [], | ||
'errors' => fn () => ['current_password' => __('validation.required', ['attribute' => __('current password')])], | ||
'errors' => ['current_password' => __('validation.required', ['attribute' => __('current password')])], | ||
], | ||
'Current password is not a string' => [ | ||
'Current password is not a string' => fn () => [ | ||
'state' => ['current_password' => false], | ||
'errors' => fn () => ['current_password' => __('validation.string', ['attribute' => __('current password')])], | ||
'errors' => ['current_password' => __('validation.string', ['attribute' => __('current password')])], | ||
], | ||
'Current password is not valid' => [ | ||
'Current password is not valid' => fn () => [ | ||
'state' => ['current_password' => 'WrongPassword'], | ||
'errors' => fn () => ['current_password' => __('The provided password does not match your current password.')], | ||
'errors' => ['current_password' => __('The provided password does not match your current password.')], | ||
], | ||
]); | ||
]; | ||
}); |
16 changes: 8 additions & 8 deletions
16
tests/Datasets/DestroyRegulatedOrganizationRequestValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
|
||
dataset('destroyRegulatedOrganizationRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Current password is missing' => [ | ||
return [ | ||
'Current password is missing' => fn () => [ | ||
'state' => ['current_password' => null], | ||
'errors' => fn () => ['current_password' => __('validation.required', ['attribute' => __('current password')])], | ||
'errors' => ['current_password' => __('validation.required', ['attribute' => __('current password')])], | ||
], | ||
'Current password is not a string' => [ | ||
'Current password is not a string' => fn () => [ | ||
'state' => ['current_password' => false], | ||
'errors' => fn () => ['current_password' => __('validation.string', ['attribute' => __('current password')])], | ||
'errors' => ['current_password' => __('validation.string', ['attribute' => __('current password')])], | ||
], | ||
'Current password does not match' => [ | ||
'Current password does not match' => fn () => [ | ||
'state' => ['current_password' => 'fake_password'], | ||
'errors' => fn () => ['current_password' => __('The provided password does not match your current password.')], | ||
'errors' => ['current_password' => __('The provided password does not match your current password.')], | ||
], | ||
]); | ||
]; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
<?php | ||
|
||
dataset('inviteParticipantValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Email is missing' => [ | ||
return [ | ||
'Email is missing' => fn () => [ | ||
'state' => ['email' => null], | ||
'errors' => fn () => ['email' => __('You must enter an email address.')], | ||
'errors' => ['email' => __('You must enter an email address.')], | ||
], | ||
'User already invited' => [ | ||
'User already invited' => fn () => [ | ||
'state' => ['email' => '[email protected]'], | ||
'errors' => fn () => ['email' => __('This individual has already been invited to your engagement.')], | ||
'errors' => ['email' => __('This individual has already been invited to your engagement.')], | ||
], | ||
'User already added to engagement' => [ | ||
'User already added to engagement' => fn () => [ | ||
'state' => ['email' => '[email protected]'], | ||
'errors' => fn () => ['email' => __('The individual with the email address you provided is already participating in this engagement.')], | ||
'errors' => ['email' => __('The individual with the email address you provided is already participating in this engagement.')], | ||
], | ||
'User not a consultation participant' => [ | ||
'User not a consultation participant' => fn () => [ | ||
'state' => ['email' => '[email protected]'], | ||
'errors' => fn () => ['email' => __('The person with the email address you provided is not a consultation participant.')], | ||
'errors' => ['email' => __('The person with the email address you provided is not a consultation participant.')], | ||
], | ||
'Email address not for an individual user' => [ | ||
'Email address not for an individual user' => fn () => [ | ||
'state' => ['email' => '[email protected]'], | ||
'errors' => fn () => ['email' => __('The person with the email address you provided is not a consultation participant.')], | ||
'errors' => ['email' => __('The person with the email address you provided is not a consultation participant.')], | ||
], | ||
]); | ||
]; | ||
}); |
16 changes: 8 additions & 8 deletions
16
tests/Datasets/SaveOrganizationRolesRequestValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
|
||
dataset('saveOrganizationRolesRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Roles is missing' => [ | ||
return [ | ||
'Roles is missing' => fn () => [ | ||
'state' => ['roles' => null], | ||
'errors' => fn () => ['roles' => __('You must select a role for your organization.')], | ||
'errors' => ['roles' => __('You must select a role for your organization.')], | ||
], | ||
'Roles is not an array' => [ | ||
'Roles is not an array' => fn () => [ | ||
'state' => ['roles' => false], | ||
'errors' => fn () => ['roles' => __('validation.array', ['attribute' => __('roles')])], | ||
'errors' => ['roles' => __('validation.array', ['attribute' => __('roles')])], | ||
], | ||
'Role is invalid' => [ | ||
'Role is invalid' => fn () => [ | ||
'state' => ['roles' => ['other']], | ||
'errors' => fn () => ['roles.0' => __('validation.exists', ['attribute' => __('roles')])], | ||
'errors' => ['roles.0' => __('validation.exists', ['attribute' => __('roles')])], | ||
], | ||
]); | ||
]; | ||
}); |
12 changes: 6 additions & 6 deletions
12
tests/Datasets/StoreAccessNeedsPermissionsValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?php | ||
|
||
dataset('storeAccessNeedsPermissionsValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Share access needs is missing' => [ | ||
return [ | ||
'Share access needs is missing' => fn () => [ | ||
'state' => [], | ||
'errors' => fn () => ['share_access_needs' => __('validation.required', ['attribute' => __('share access needs')])], | ||
'errors' => ['share_access_needs' => __('validation.required', ['attribute' => __('share access needs')])], | ||
], | ||
'Share access needs is not a boolean' => [ | ||
'Share access needs is not a boolean' => fn () => [ | ||
'state' => ['share_access_needs' => 123], | ||
'errors' => fn () => ['share_access_needs' => __('validation.boolean', ['attribute' => __('share access needs')])], | ||
'errors' => ['share_access_needs' => __('validation.boolean', ['attribute' => __('share access needs')])], | ||
], | ||
]); | ||
]; | ||
}); |
12 changes: 6 additions & 6 deletions
12
tests/Datasets/StoreEngagementFormatRequestValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?php | ||
|
||
dataset('storeEngagementFormatRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Format is missing' => [ | ||
return [ | ||
'Format is missing' => fn () => [ | ||
'state' => ['format' => null], | ||
'errors' => fn () => ['format' => __('validation.required', ['attribute' => __('engagement format')])], | ||
'errors' => ['format' => __('validation.required', ['attribute' => __('engagement format')])], | ||
], | ||
'Format is invalid' => [ | ||
'Format is invalid' => fn () => [ | ||
'state' => ['format' => ['xyz']], | ||
'errors' => fn () => ['format' => __('validation.exists', ['attribute' => __('engagement format')])], | ||
'errors' => ['format' => __('validation.exists', ['attribute' => __('engagement format')])], | ||
], | ||
]); | ||
]; | ||
}); |
20 changes: 10 additions & 10 deletions
20
tests/Datasets/StoreEngagementLanguagesRequestValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<?php | ||
|
||
dataset('storeEngagementLanguagesRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Languages is missing' => [ | ||
return [ | ||
'Languages is missing' => fn () => [ | ||
'state' => ['languages' => null], | ||
'errors' => fn () => ['languages' => __('validation.required', ['attribute' => __('languages')])], | ||
'errors' => ['languages' => __('validation.required', ['attribute' => __('languages')])], | ||
], | ||
'Languages is not an array' => [ | ||
'Languages is not an array' => fn () => [ | ||
'state' => ['languages' => false], | ||
'errors' => fn () => ['languages' => __('validation.array', ['attribute' => __('languages')])], | ||
'errors' => ['languages' => __('validation.array', ['attribute' => __('languages')])], | ||
], | ||
'Languages is empty' => [ | ||
'Languages is empty' => fn () => [ | ||
'state' => ['languages' => []], | ||
'errors' => fn () => ['languages' => __('validation.required', ['attribute' => __('languages')])], | ||
'errors' => ['languages' => __('validation.required', ['attribute' => __('languages')])], | ||
], | ||
'Language is invalid' => [ | ||
'Language is invalid' => fn () => [ | ||
'state' => ['languages' => ['xyz']], | ||
'errors' => fn () => ['languages.0' => __('validation.exists', ['attribute' => __('languages')])], | ||
'errors' => ['languages.0' => __('validation.exists', ['attribute' => __('languages')])], | ||
], | ||
]); | ||
]; | ||
}); |
12 changes: 6 additions & 6 deletions
12
tests/Datasets/StoreEngagementRecruitmentRequestValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
<?php | ||
|
||
dataset('storeEngagementRecruitmentRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Recruitment is missing' => [ | ||
return [ | ||
'Recruitment is missing' => fn () => [ | ||
'state' => ['recruitment' => null], | ||
'errors' => fn () => ['recruitment' => __('validation.required', ['attribute' => __('recruitment method')])], | ||
'errors' => ['recruitment' => __('validation.required', ['attribute' => __('recruitment method')])], | ||
], | ||
'Recruitment is invalid' => [ | ||
'Recruitment is invalid' => fn () => [ | ||
'state' => ['recruitment' => ['xyz']], | ||
'errors' => fn () => ['recruitment' => __('validation.exists', ['attribute' => __('recruitment method')])], | ||
'errors' => ['recruitment' => __('validation.exists', ['attribute' => __('recruitment method')])], | ||
], | ||
]); | ||
]; | ||
}); |
28 changes: 14 additions & 14 deletions
28
tests/Datasets/StoreEngagementRequestValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
<?php | ||
|
||
dataset('storeEngagementRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Project id is missing' => [ | ||
return [ | ||
'Project id is missing' => fn () => [ | ||
'state' => ['project_id' => null], | ||
'errors' => fn () => ['project_id' => __('validation.required', ['attribute' => __('project id')])], | ||
'errors' => ['project_id' => __('validation.required', ['attribute' => __('project id')])], | ||
], | ||
'Project id is invalid' => [ | ||
'Project id is invalid' => fn () => [ | ||
'state' => ['project_id' => 100000], | ||
'errors' => fn () => ['project_id' => __('validation.exists', ['attribute' => __('project id')])], | ||
'errors' => ['project_id' => __('validation.exists', ['attribute' => __('project id')])], | ||
], | ||
'Name is not a string' => [ | ||
'Name is not a string' => fn () => [ | ||
'state' => ['name' => ['en' => 123]], | ||
'errors' => fn () => ['name.en' => __('validation.string', ['attribute' => __('engagement name (English)')])], | ||
'errors' => ['name.en' => __('validation.string', ['attribute' => __('engagement name (English)')])], | ||
], | ||
'Name is missing required translation' => [ | ||
'Name is missing required translation' => fn () => [ | ||
'state' => ['name' => ['es' => 'Nombre del compromiso']], | ||
'errors' => fn () => [ | ||
'errors' => [ | ||
'name.en' => __('An engagement name must be provided in at least one language.'), | ||
'name.fr' => __('An engagement name must be provided in at least one language.'), | ||
], | ||
], | ||
'Who is missing' => [ | ||
'Who is missing' => fn () => [ | ||
'state' => ['who' => null], | ||
'errors' => fn () => ['who' => __('You must indicate who you want to engage.')], | ||
'errors' => ['who' => __('You must indicate who you want to engage.')], | ||
], | ||
'Who is invalid' => [ | ||
'Who is invalid' => fn () => [ | ||
'state' => ['who' => 'other'], | ||
'errors' => fn () => ['who' => __('validation.exists', ['attribute' => __('who')])], | ||
'errors' => ['who' => __('validation.exists', ['attribute' => __('who')])], | ||
], | ||
]); | ||
]; | ||
}); |
16 changes: 8 additions & 8 deletions
16
tests/Datasets/StoreOrganizationLanguagesRequestValidationErrors.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
<?php | ||
|
||
dataset('storeOrganizationLanguagesRequestValidationErrors', function () { | ||
return array_map('array_values', [ | ||
'Languages is missing' => [ | ||
return [ | ||
'Languages is missing' => fn () => [ | ||
'state' => ['roles' => null], | ||
'errors' => fn () => ['languages' => __('validation.required', ['attribute' => __('languages')])], | ||
'errors' => ['languages' => __('validation.required', ['attribute' => __('languages')])], | ||
], | ||
'Languages is not an array' => [ | ||
'Languages is not an array' => fn () => [ | ||
'state' => ['languages' => false], | ||
'errors' => fn () => ['languages' => __('validation.array', ['attribute' => __('languages')])], | ||
'errors' => ['languages' => __('validation.array', ['attribute' => __('languages')])], | ||
], | ||
'Languages is empty' => [ | ||
'Languages is empty' => fn () => [ | ||
'state' => ['languages' => []], | ||
'errors' => fn () => ['languages' => __('validation.required', ['attribute' => __('languages')])], | ||
'errors' => ['languages' => __('validation.required', ['attribute' => __('languages')])], | ||
], | ||
]); | ||
]; | ||
}); |
Oops, something went wrong.