mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Expand test code.
This commit is contained in:
@@ -37,33 +37,6 @@ class StoreControllerTest extends TestCase
|
||||
{
|
||||
use RandomValues, TestHelpers, CollectsValues;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
Passport::actingAs($this->user());
|
||||
Log::info(sprintf('Now in %s.', get_class($this)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param array $submission
|
||||
*
|
||||
* emptyDataProvider / storeDataProvider
|
||||
* @dataProvider storeDataProvider
|
||||
*/
|
||||
public function testStore(array $submission): void
|
||||
{
|
||||
if ([] === $submission) {
|
||||
$this->markTestSkipped('Empty data provider');
|
||||
}
|
||||
// run account store with a minimal data set:
|
||||
$route = 'api.v1.attachments.store';
|
||||
$this->storeAndCompare($route, $submission);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
@@ -73,6 +46,15 @@ class StoreControllerTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
Passport::actingAs($this->user());
|
||||
Log::info(sprintf('Now in %s.', get_class($this)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
@@ -86,7 +68,6 @@ class StoreControllerTest extends TestCase
|
||||
return $this->genericDataProvider($minimalSets, $optionalSets, $regenConfig);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
@@ -135,4 +116,21 @@ class StoreControllerTest extends TestCase
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $submission
|
||||
*
|
||||
* emptyDataProvider / storeDataProvider
|
||||
*
|
||||
* @dataProvider storeDataProvider
|
||||
*/
|
||||
public function testStore(array $submission): void
|
||||
{
|
||||
if ([] === $submission) {
|
||||
$this->markTestSkipped('Empty data provider');
|
||||
}
|
||||
// run account store with a minimal data set:
|
||||
$route = 'api.v1.attachments.store';
|
||||
$this->storeAndCompare($route, $submission);
|
||||
}
|
||||
}
|
@@ -110,7 +110,7 @@ class UpdateControllerTest extends TestCase
|
||||
'id' => 1,
|
||||
'fields' => [
|
||||
'attachable_type' => ['test_value' => 'TransactionJournal'],
|
||||
'attachable_id' => ['test_value' => (string)2],
|
||||
'attachable_id' => ['test_value' => (string)2],
|
||||
],
|
||||
'extra_ignore' => [],
|
||||
],
|
||||
|
Reference in New Issue
Block a user