Core testing infrastructure module for Pest PHP tests.
nuc_tests/tests/
├── functions/
│ ├── apiTest.php
│ ├── apiTestArray.php
│ ├── expectLogMessage.php
│ └── getModelByEntity.php
├── testcase/
│ ├── CreatesApplication.php
│ ├── CreatesUsers.php
│ └── ResolvesSqlite.php
├── Functions.php
├── TestCase.php
├── Expectations.php
├── Groups.php
├── Uses.php
└── Pest.phpAll utilities are loaded via tests/Pest.php.
test('example',
apiTest(
'PUT',
'contacts.update',
422,
$data,
$structure,
$fragment
)
);apiTestArray([
'user_id > empty' => [
'method' => 'POST',
'route' => 'contacts.store',
'data' => ['user_id' => ''],
'structure' => ['errors' => ['user_id']],
'fragment' => ['errors' => ['user_id' => ['...']]],
],
'put > index api' => [
'method' => 'PUT',
'route' => 'contacts.index',
'status' => 405,
'id' => 1,
'json' => false, // uses put() instead of putJson()
],
'destroy api' => [
'method' => 'DELETE',
'route' => 'contacts.destroy',
'status' => 401,
'id' => 1,
],
]);