mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +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); | ||||
|     } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user