Code cleanup.

This commit is contained in:
James Cole
2021-03-28 11:43:07 +02:00
parent 5abbb8a807
commit 2c575f3ca5
379 changed files with 304 additions and 1727 deletions

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Autocomplete;
use Laravel\Passport\Passport;
use Log;
use Tests\TestCase;
@@ -60,4 +60,4 @@ class AccountControllerTest extends TestCase
$this->assertTrue(true);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Account;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -200,4 +200,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Account;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -30,8 +30,6 @@ use Tests\Objects\TestConfiguration;
use Tests\TestCase;
use Tests\Traits\CollectsValues;
use Tests\Traits\TestHelpers;
/**
* Class UpdateControllerTest
*/
@@ -204,4 +202,4 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.accounts.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Attachment;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -105,4 +105,4 @@ class StoreControllerTest extends TestCase
$address = route('api.v1.attachments.store');
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Attachment;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.attachments.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -99,4 +95,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\AvailableBudget;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -94,8 +94,6 @@ class StoreControllerTest extends TestCase
return $configuration->generateAll();
}
/**
* @param array $submission
*
@@ -116,4 +114,4 @@ class StoreControllerTest extends TestCase
$address = route('api.v1.available_budgets.store');
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\AvailableBudget;
use Faker\Factory;
use Laravel\Passport\Passport;
use Log;
@@ -48,8 +48,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @param array $submission
*
@@ -69,8 +67,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.available_budgets.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -122,4 +118,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Bill;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -128,8 +128,6 @@ class StoreControllerTest extends TestCase
$fieldSet->parameters = [1];
$fieldSet->addField(Field::createBasic('active', 'boolean'));
$configuration->addOptionalFieldSet('active', $fieldSet);
$fieldSet = new FieldSet;
$fieldSet->parameters = [1];
$fieldSet->addField(Field::createBasic('notes', 'uuid'));
@@ -157,8 +155,6 @@ class StoreControllerTest extends TestCase
return $configuration->generateAll();
}
/**
* @param array $submission
*
@@ -180,4 +176,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Bill;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.bills.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -163,4 +159,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Budget;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -105,12 +105,8 @@ class StoreControllerTest extends TestCase
$fieldSet->addField(Field::createBasic('auto_budget_amount', 'random-amount'));
$fieldSet->addField(Field::createBasic('auto_budget_period', 'random-auto-period'));
$configuration->addOptionalFieldSet('auto-code', $fieldSet);
return $configuration->generateAll();
}
/**
* @param array $submission
*
@@ -132,4 +128,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Budget;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -67,8 +65,6 @@ class UpdateControllerTest extends TestCase
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -129,10 +125,6 @@ class UpdateControllerTest extends TestCase
$field->title = 'auto_budget_type';
$fieldSet->addField($field);
$configuration->addOptionalFieldSet('none', $fieldSet);
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\BudgetLimit;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -113,8 +113,6 @@ class StoreControllerTest extends TestCase
return $configuration->generateAll();
}
/**
* @param array $submission
*
@@ -136,4 +134,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\BudgetLimit;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.budgets.limits.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -113,4 +109,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Category;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -79,8 +79,6 @@ class StoreControllerTest extends TestCase
return $configuration->generateAll();
}
/**
* @param array $submission
*
@@ -102,4 +100,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Category;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -65,11 +63,7 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.categories.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -90,6 +84,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\ObjectGroup;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.object-groups.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -88,4 +84,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\PiggyBank;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -143,4 +143,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\PiggyBank;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.piggy_banks.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -145,4 +141,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Recurrence;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -93,8 +93,6 @@ class StoreControllerTest extends TestCase
$defaultSet->addField(Field::createBasic('transactions/0/source_id', 'random-asset-id'));
$defaultSet->addField(Field::createBasic('transactions/0/destination_id', 'random-expense-id'));
$configuration->addMandatoryFieldSet($defaultSet);
$defaultSet = new FieldSet();
$defaultSet->title = 'default_deposit';
$defaultSet->addField(Field::createBasic('type', 'static-deposit'));
@@ -190,4 +188,4 @@ class StoreControllerTest extends TestCase
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Recurrence;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -67,8 +65,6 @@ class UpdateControllerTest extends TestCase
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -106,8 +102,6 @@ class UpdateControllerTest extends TestCase
$field = Field::createBasic('active', 'boolean');
$fieldSet->addField($field);
$configuration->addOptionalFieldSet('active', $fieldSet);
$fieldSet = new FieldSet;
$fieldSet->parameters = [1];
$field = Field::createBasic('repetitions/0/type', 'static-ndom');
@@ -115,8 +109,6 @@ class UpdateControllerTest extends TestCase
$fieldSet->addField($field);
$fieldSet->addField(Field::createBasic('repetitions/0/moment', 'moment-ndom'));
$configuration->addOptionalFieldSet('ndom', $fieldSet);
$fieldSet = new FieldSet;
$fieldSet->parameters = [1];
$field = Field::createBasic('repetitions/0/type', 'static-monthly');
@@ -124,8 +116,6 @@ class UpdateControllerTest extends TestCase
$fieldSet->addField($field);
$fieldSet->addField(Field::createBasic('repetitions/0/moment', 'moment-monthly'));
$configuration->addOptionalFieldSet('monthly', $fieldSet);
$fieldSet = new FieldSet;
$fieldSet->parameters = [1];
$field = Field::createBasic('repetitions/0/type', 'static-yearly');
@@ -133,8 +123,6 @@ class UpdateControllerTest extends TestCase
$fieldSet->addField($field);
$fieldSet->addField(Field::createBasic('repetitions/0/moment', 'random-past-date'));
$configuration->addOptionalFieldSet('yearly', $fieldSet);
$fieldSet = new FieldSet;
$fieldSet->parameters = [1];
$field = Field::createBasic('repetitions/0/skip', 'random-skip');
@@ -156,8 +144,6 @@ class UpdateControllerTest extends TestCase
$field->ignorableFields = ['transactions/0/foreign_currency_code', 'transactions/0/foreign_currency_symbol'];
$fieldSet->addField($field);
$configuration->addOptionalFieldSet('foreign1', $fieldSet);
$fieldSet = new FieldSet;
$fieldSet->parameters = [1];
$field = Field::createBasic('transactions/0/budget_id', 'random-budget-id');
@@ -186,4 +172,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Rule;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -116,11 +116,7 @@ class StoreControllerTest extends TestCase
$fieldSet = new FieldSet;
$fieldSet->addField(Field::createBasic('actions/0/active', 'boolean'));
$configuration->addOptionalFieldSet('activeXX', $fieldSet);
return $configuration->generateAll();
}
/**
@@ -144,4 +140,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -1,4 +1,6 @@
<?php
declare(strict_types=1);
/*
* UpdateControllerTEst.php
* Copyright (c) 2021 james@firefly-iii.org
@@ -46,8 +48,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +66,6 @@ class UpdateControllerTest extends TestCase
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -165,4 +163,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\RuleGroup;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -112,4 +112,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\RuleGroup;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.rule_groups.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -101,4 +97,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Tag;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -113,4 +113,4 @@ class StoreControllerTest extends TestCase
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Tag;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.tags.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -99,4 +95,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Transaction;
use Carbon\Carbon;
use Laravel\Passport\Passport;
use Log;
@@ -104,8 +104,6 @@ class StoreControllerTest extends TestCase
$fieldSet = new FieldSet;
$fieldSet->addField(Field::createBasic('transactions/0/tags', 'random-tags'));
$configuration->addOptionalFieldSet('tags', $fieldSet);
$array = ['notes', 'internal_reference', 'bunq_payment_id', 'sepa_cc', 'sepa_ct_op', 'sepa_ct_id',
'sepa_db', 'sepa_country', 'sepa_ep', 'sepa_ci', 'sepa_batch_id'];
@@ -117,8 +115,6 @@ class StoreControllerTest extends TestCase
return $configuration->generateAll();
}
/**
* @param array $submission
*
@@ -141,4 +137,4 @@ class StoreControllerTest extends TestCase
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\Transaction;
use Carbon\Carbon;
use Laravel\Passport\Passport;
use Log;
@@ -48,8 +48,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*
@@ -69,8 +67,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.transactions.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -133,8 +129,6 @@ class UpdateControllerTest extends TestCase
$field->ignorableFields = ['transactions/0/destination_name', 'transactions/0/destination_iban'];
$fieldSet->addField($field);
$configuration->addOptionalFieldSet('dest', $fieldSet);
// optional fields
$fieldSet = new FieldSet;
$fieldSet->parameters = [1];
@@ -162,8 +156,6 @@ class UpdateControllerTest extends TestCase
};
$fieldSet->addField($field);
$configuration->addOptionalFieldSet('tags', $fieldSet);
$array = ['notes', 'internal_reference', 'bunq_payment_id', 'sepa_cc', 'sepa_ct_op', 'sepa_ct_id',
'sepa_db', 'sepa_country', 'sepa_ep', 'sepa_ci', 'sepa_batch_id'];
@@ -173,12 +165,8 @@ class UpdateControllerTest extends TestCase
$fieldSet->addField(Field::createBasic('transactions/0/' . $value, 'uuid'));
$configuration->addOptionalFieldSet($value, $fieldSet);
}
$result = $configuration->generateAll();
return $result;
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\TransactionCurrency;
use Faker\Factory;
use Laravel\Passport\Passport;
use Log;
@@ -95,8 +95,6 @@ class StoreControllerTest extends TestCase
$field = Field::createBasic('decimal_places', 'currency-dp');
$fieldSet->addField($field);
$configuration->addOptionalFieldSet('decimal_places', $fieldSet);
return $configuration->generateAll();
}
@@ -122,4 +120,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\TransactionCurrency;
use Faker\Factory;
use Laravel\Passport\Passport;
use Log;
@@ -49,8 +49,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -68,8 +66,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.currencies.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -109,12 +105,8 @@ class UpdateControllerTest extends TestCase
$fieldSet->parameters = ['RMB'];
$fieldSet->addField(Field::createBasic('symbol', 'random-new-currency-code'));
$configuration->addOptionalFieldSet('code', $fieldSet);
return $configuration->generateAll();
}
/**
* @return array
*/
@@ -168,6 +160,4 @@ class UpdateControllerTest extends TestCase
return $set;
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\TransactionLink;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -88,8 +88,6 @@ class StoreControllerTest extends TestCase
return $configuration->generateAll();
}
/**
* @param array $submission
*
@@ -109,8 +107,6 @@ class StoreControllerTest extends TestCase
// run account store with a minimal data set:
$address = route('api.v1.transaction_links.store');
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\TransactionLink;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.transaction_links.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -107,11 +103,7 @@ class UpdateControllerTest extends TestCase
$fieldSet->parameters = [1];
$fieldSet->addField(Field::createBasic('notes', 'uuid'));
$configuration->addOptionalFieldSet('notes', $fieldSet);
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\TransactionLinkType;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -72,8 +72,6 @@ class StoreControllerTest extends TestCase
$defaultSet->addField(Field::createBasic('inward', 'uuid'));
$defaultSet->addField(Field::createBasic('outward', 'uuid'));
$configuration->addMandatoryFieldSet($defaultSet);
return $configuration->generateAll();
}
@@ -99,4 +97,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Models\TransactionLinkType;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.link_types.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -93,4 +89,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Webhook;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -79,8 +79,6 @@ class StoreControllerTest extends TestCase
$field = Field::createBasic('active', 'boolean');
$fieldSet->addField($field);
$configuration->addOptionalFieldSet('active', $fieldSet);
return $configuration->generateAll();
}
@@ -105,4 +103,4 @@ class StoreControllerTest extends TestCase
$this->assertPOST($address, $submission);
}
}
}

View File

@@ -19,9 +19,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace Tests\Api\Webhook;
use Laravel\Passport\Passport;
use Log;
use Tests\Objects\Field;
@@ -47,8 +47,6 @@ class UpdateControllerTest extends TestCase
Passport::actingAs($this->user());
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @dataProvider updateDataProvider
*/
@@ -66,8 +64,6 @@ class UpdateControllerTest extends TestCase
$route = route('api.v1.webhooks.update', $submission['parameters']);
$this->assertPUT($route, $submission);
}
/**
* @return array
*/
@@ -113,6 +109,4 @@ class UpdateControllerTest extends TestCase
return $configuration->generateAll();
}
}
}