Update test code.

This commit is contained in:
James Cole
2021-03-20 07:21:13 +01:00
parent 836f0ecf3f
commit bc5aa4b4cd
41 changed files with 255 additions and 945 deletions

View File

@@ -29,7 +29,6 @@ use Tests\Objects\FieldSet;
use Tests\Objects\TestConfiguration;
use Tests\TestCase;
use Tests\Traits\CollectsValues;
use Tests\Traits\RandomValues;
use Tests\Traits\TestHelpers;
/**
@@ -37,7 +36,7 @@ use Tests\Traits\TestHelpers;
*/
class StoreControllerTest extends TestCase
{
use RandomValues, TestHelpers, CollectsValues;
use TestHelpers, CollectsValues;
/**
* @return array
@@ -58,27 +57,6 @@ class StoreControllerTest extends TestCase
Log::info(sprintf('Now in %s.', get_class($this)));
}
/**
* @param array $submission
*
* storeDataProvider / emptyDataProvider
*
* @dataProvider emptyDataProvider
*/
public function testStore(array $submission): void
{
if ([] === $submission) {
$this->markTestSkipped('Empty provider.');
}
Log::debug('testStoreUpdated()');
Log::debug('submission :', $submission['submission']);
Log::debug('expected :', $submission['expected']);
Log::debug('ignore :', $submission['ignore']);
// run account store with a minimal data set:
$address = route('api.v1.accounts.store');
$this->updatedStoreAndCompare($address, $submission);
}
/**
* @return array
*/
@@ -217,4 +195,25 @@ class StoreControllerTest extends TestCase
return $final;
}
/**
* @param array $submission
*
* storeDataProvider / emptyDataProvider
*
* @dataProvider emptyDataProvider
*/
public function testStore(array $submission): void
{
if ([] === $submission) {
$this->markTestSkipped('Empty provider.');
}
Log::debug('testStoreUpdated()');
Log::debug('submission :', $submission['submission']);
Log::debug('expected :', $submission['expected']);
Log::debug('ignore :', $submission['ignore']);
// run account store with a minimal data set:
$address = route('api.v1.accounts.store');
$this->assertPOST($address, $submission);
}
}