|
3 | 3 | namespace Tests; |
4 | 4 |
|
5 | 5 | use Mockery; |
6 | | -use Illuminate\Support\Facades\Storage; |
7 | 6 | use Mockery\MockInterface; |
| 7 | +use Illuminate\Support\Facades\Storage; |
8 | 8 | use ZeroDaHero\LaravelWorkflow\Commands\WorkflowDumpCommand; |
9 | 9 |
|
10 | 10 | class WorkflowDumpCommandTest extends BaseWorkflowTestCase |
@@ -34,7 +34,7 @@ public function testShouldThrowExceptionForUndefinedClass() |
34 | 34 | public function testWorkflowCommand() |
35 | 35 | { |
36 | 36 | $optionalPath = '/my/path'; |
37 | | - $disk = 'public'; |
| 37 | + $disk = 'public'; |
38 | 38 |
|
39 | 39 | Storage::fake($disk); |
40 | 40 |
|
@@ -88,6 +88,35 @@ public function testWorkflowCommandWithoutMetadata() |
88 | 88 | $this->assertStringNotContainsString('metadata_exists', $svg_file); |
89 | 89 | } |
90 | 90 |
|
| 91 | + protected function getEnvironmentSetUp($app) |
| 92 | + { |
| 93 | + $app['config']['workflow'] = [ |
| 94 | + 'straight' => [ |
| 95 | + 'supports' => ['Tests\Fixtures\TestObject'], |
| 96 | + 'places' => [ |
| 97 | + 'a', |
| 98 | + 'b', |
| 99 | + 'c', |
| 100 | + 'metadata_place' => [ |
| 101 | + 'metadata' => [ |
| 102 | + 'metadata_exists' => true, |
| 103 | + ], |
| 104 | + ], |
| 105 | + ], |
| 106 | + 'transitions' => [ |
| 107 | + 't1' => [ |
| 108 | + 'from' => 'a', |
| 109 | + 'to' => 'b', |
| 110 | + ], |
| 111 | + 't2' => [ |
| 112 | + 'from' => 'b', |
| 113 | + 'to' => 'c', |
| 114 | + ], |
| 115 | + ], |
| 116 | + ], |
| 117 | + ]; |
| 118 | + } |
| 119 | + |
91 | 120 | private function getMock( |
92 | 121 | string $workflow = 'straight', |
93 | 122 | string $format = 'png', |
@@ -118,33 +147,4 @@ private function getMock( |
118 | 147 | ->andReturn($withMetadata) |
119 | 148 | ->getMock(); |
120 | 149 | } |
121 | | - |
122 | | - protected function getEnvironmentSetUp($app) |
123 | | - { |
124 | | - $app['config']['workflow'] = [ |
125 | | - 'straight' => [ |
126 | | - 'supports' => ['Tests\Fixtures\TestObject'], |
127 | | - 'places' => [ |
128 | | - 'a', |
129 | | - 'b', |
130 | | - 'c', |
131 | | - 'metadata_place' => [ |
132 | | - 'metadata' => [ |
133 | | - 'metadata_exists' => true, |
134 | | - ], |
135 | | - ], |
136 | | - ], |
137 | | - 'transitions' => [ |
138 | | - 't1' => [ |
139 | | - 'from' => 'a', |
140 | | - 'to' => 'b', |
141 | | - ], |
142 | | - 't2' => [ |
143 | | - 'from' => 'b', |
144 | | - 'to' => 'c', |
145 | | - ], |
146 | | - ], |
147 | | - ], |
148 | | - ]; |
149 | | - } |
150 | 150 | } |
0 commit comments