Skip to content

Commit 9fe3ca7

Browse files
aarondfrancisgithub-actions[bot]
authored andcommitted
Fix code styling [ci skip]
1 parent a5e5ffb commit 9fe3ca7

11 files changed

+167
-85
lines changed

tests/Unit/Commands/ActivateTest.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public function assertEvents($deployed = true, $activated = true)
6666
Event::assertNotDispatched(AfterFunctionsActivated::class);
6767
}
6868
}
69-
public function test_it_should_activate_functions()
69+
70+
public function test_it_should_activate_functions()
7071
{
7172
$this->mockActivating();
7273

@@ -85,7 +86,8 @@ protected function mockInvokeAsync($with = [], $return = null)
8586
{
8687
return $this->mockMethod('invokeAsync', $with, $return);
8788
}
88-
public function test_it_should_pre_warm_functions_if_the_latest_version_is_different()
89+
90+
public function test_it_should_pre_warm_functions_if_the_latest_version_is_different()
8991
{
9092
// The latest version is not the active version.
9193
$this->lambda->shouldReceive('latestVersionHasAlias')
@@ -123,7 +125,8 @@ public function test_it_should_pre_warm_functions_if_the_latest_version_is_diffe
123125

124126
$this->artisan('sidecar:activate --pre-warm');
125127
}
126-
public function test_it_should_not_pre_warm_functions_if_the_latest_version_is_the_same()
128+
129+
public function test_it_should_not_pre_warm_functions_if_the_latest_version_is_the_same()
127130
{
128131
$this->lambda->shouldReceive('latestVersionHasAlias')
129132
->andReturn(true);
@@ -145,7 +148,8 @@ public function test_it_should_not_pre_warm_functions_if_the_latest_version_is_t
145148

146149
$this->artisan('sidecar:activate --pre-warm');
147150
}
148-
public function test_it_should_activate_functions_with_env()
151+
152+
public function test_it_should_activate_functions_with_env()
149153
{
150154
$this->mockActivating();
151155

tests/Unit/Commands/ConfigureTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ protected function createRolePayload()
156156
]),
157157
];
158158
}
159-
public function test_basic_happy_path()
159+
160+
public function test_basic_happy_path()
160161
{
161162
$this->mockS3(function ($mock) {
162163
$this->mockHeadBucketNotFound($mock);

tests/Unit/Commands/DeployTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class DeployTest extends DeploymentTest
1313
{
14-
public function test_it_deploys_the_functions_in_the_config()
14+
public function test_it_deploys_the_functions_in_the_config()
1515
{
1616
$this->lambda->shouldReceive('functionExists')->andReturn(false);
1717
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -25,7 +25,8 @@ public function test_it_deploys_the_functions_in_the_config()
2525

2626
$this->assertEvents($deployed = true, $activated = false);
2727
}
28-
public function test_it_deploys_and_activates_the_functions_in_the_config()
28+
29+
public function test_it_deploys_and_activates_the_functions_in_the_config()
2930
{
3031
$this->lambda->shouldReceive('functionExists')->andReturn(false);
3132
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -42,7 +43,8 @@ public function test_it_deploys_and_activates_the_functions_in_the_config()
4243

4344
$this->assertEvents($deployed = true, $activated = true);
4445
}
45-
public function test_it_uses_a_fake_environment()
46+
47+
public function test_it_uses_a_fake_environment()
4648
{
4749
$this->lambda->shouldReceive('functionExists')->andReturn(false);
4850
$this->lambda->shouldReceive('getVersions')->andReturn([]);

tests/Unit/DeploymentTest.php

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ public function assertEvents($deployed = true, $activated = true)
110110
Event::assertNotDispatched(AfterFunctionsActivated::class);
111111
}
112112
}
113-
public function test_it_deploys_a_function_that_doesnt_exist()
113+
114+
public function test_it_deploys_a_function_that_doesnt_exist()
114115
{
115116
$this->lambda->shouldReceive('functionExists')->andReturn(false);
116117
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -120,7 +121,8 @@ public function test_it_deploys_a_function_that_doesnt_exist()
120121

121122
$this->assertEvents($deployed = true, $activated = false);
122123
}
123-
public function test_it_deploys_a_function_that_doesnt_exist_from_the_deployment_class()
124+
125+
public function test_it_deploys_a_function_that_doesnt_exist_from_the_deployment_class()
124126
{
125127
$this->lambda->shouldReceive('functionExists')->andReturn(false);
126128
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -130,7 +132,8 @@ public function test_it_deploys_a_function_that_doesnt_exist_from_the_deployment
130132

131133
$this->assertEvents($deployed = true, $activated = false);
132134
}
133-
public function test_it_deploys_an_array_of_functions()
135+
136+
public function test_it_deploys_an_array_of_functions()
134137
{
135138
$this->lambda->shouldReceive('functionExists')->andReturn(false);
136139
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -140,7 +143,8 @@ public function test_it_deploys_an_array_of_functions()
140143

141144
$this->assertEvents($deployed = true, $activated = false);
142145
}
143-
public function test_it_deploys_the_functions_in_the_config()
146+
147+
public function test_it_deploys_the_functions_in_the_config()
144148
{
145149
$this->lambda->shouldReceive('functionExists')->andReturn(false);
146150
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -154,7 +158,8 @@ public function test_it_deploys_the_functions_in_the_config()
154158

155159
$this->assertEvents($deployed = true, $activated = false);
156160
}
157-
public function test_it_deploys_and_activates_a_function_that_doesnt_exist()
161+
162+
public function test_it_deploys_and_activates_a_function_that_doesnt_exist()
158163
{
159164
$this->lambda->shouldReceive('functionExists')->andReturn(false);
160165
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -165,7 +170,8 @@ public function test_it_deploys_and_activates_a_function_that_doesnt_exist()
165170

166171
$this->assertEvents($deployed = true, $activated = true);
167172
}
168-
public function test_it_updates_an_existing_function()
173+
174+
public function test_it_updates_an_existing_function()
169175
{
170176
$this->lambda->shouldReceive('functionExists')->andReturn(true);
171177
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -177,7 +183,8 @@ public function test_it_updates_an_existing_function()
177183

178184
$this->assertEvents($deployed = true, $activated = false);
179185
}
180-
public function test_it_updates_and_activates_an_existing_function()
186+
187+
public function test_it_updates_and_activates_an_existing_function()
181188
{
182189
$this->lambda->shouldReceive('functionExists')->andReturn(true);
183190
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -190,7 +197,8 @@ public function test_it_updates_and_activates_an_existing_function()
190197

191198
$this->assertEvents($deployed = true, $activated = true);
192199
}
193-
public function test_it_sets_environment_variables()
200+
201+
public function test_it_sets_environment_variables()
194202
{
195203
$this->lambda->shouldReceive('functionExists')->andReturn(true);
196204
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -229,7 +237,8 @@ public function test_it_sets_environment_variables()
229237

230238
$this->assertEvents($deployed = true, $activated = true);
231239
}
232-
public function test_it_doesnt_change_variables_that_havent_changed()
240+
241+
public function test_it_doesnt_change_variables_that_havent_changed()
233242
{
234243
$this->lambda->shouldReceive('functionExists')->andReturn(true);
235244
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -253,7 +262,8 @@ public function test_it_doesnt_change_variables_that_havent_changed()
253262

254263
$this->assertEvents($deployed = true, $activated = true);
255264
}
256-
public function test_it_sets_function_tags()
265+
266+
public function test_it_sets_function_tags()
257267
{
258268
$this->lambda->shouldReceive('functionExists')->andReturn(false);
259269
$this->lambda->shouldReceive('getVersions')->andReturn([]);
@@ -304,7 +314,8 @@ public function test_it_sets_function_tags()
304314

305315
$this->assertEvents($deployed = true, $activated = true);
306316
}
307-
public function test_it_throws_an_exception_if_there_are_no_functions()
317+
318+
public function test_it_throws_an_exception_if_there_are_no_functions()
308319
{
309320
config()->set('sidecar.functions', [
310321

tests/Unit/EnvironmentMismatchTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ protected function mockInvokeNonExistent()
4040
->once()
4141
->andThrow($this->notFoundException());
4242
}
43-
public function test_it_throws_the_right_exception()
43+
44+
public function test_it_throws_the_right_exception()
4445
{
4546
$this->mockInvokeNonExistent();
4647

tests/Unit/EnvironmentTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class EnvironmentTest extends Base
1212
{
13-
public function test_it_can_be_overridden()
13+
public function test_it_can_be_overridden()
1414
{
1515
$this->assertEquals('testing', Sidecar::getEnvironment());
1616

@@ -22,7 +22,8 @@ public function test_it_can_be_overridden()
2222

2323
$this->assertEquals('testing', Sidecar::getEnvironment());
2424
}
25-
public function test_precedence_is_correct()
25+
26+
public function test_precedence_is_correct()
2627
{
2728
Sidecar::clearEnvironment();
2829

tests/Unit/ExecuteMultipleTest.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ protected function mockMultiple()
7777
]))
7878
->andReturn($result);
7979
}
80-
public function test_execute_many_by_function()
80+
81+
public function test_execute_many_by_function()
8182
{
8283
$this->mockMultiple();
8384

@@ -91,7 +92,8 @@ public function test_execute_many_by_function()
9192

9293
$this->assertEvents(3);
9394
}
94-
public function test_execute_many_by_facade()
95+
96+
public function test_execute_many_by_facade()
9597
{
9698
$this->mockMultiple();
9799

@@ -105,7 +107,8 @@ public function test_execute_many_by_facade()
105107

106108
$this->assertEvents(3);
107109
}
108-
public function test_execute_many_by_facade_with_instantiated_class()
110+
111+
public function test_execute_many_by_facade_with_instantiated_class()
109112
{
110113
$this->mockMultiple();
111114

@@ -119,7 +122,8 @@ public function test_execute_many_by_facade_with_instantiated_class()
119122

120123
$this->assertEvents(3);
121124
}
122-
public function test_execute_many_by_function_int()
125+
126+
public function test_execute_many_by_function_int()
123127
{
124128
$result = Mockery::mock(PromiseInterface::class)
125129
->shouldReceive('wait')
@@ -135,7 +139,8 @@ public function test_execute_many_by_function_int()
135139

136140
$this->assertEvents(5);
137141
}
138-
public function test_execute_many_by_facade_int()
142+
143+
public function test_execute_many_by_facade_int()
139144
{
140145
$result = Mockery::mock(PromiseInterface::class)
141146
->shouldReceive('wait')
@@ -151,7 +156,8 @@ public function test_execute_many_by_facade_int()
151156

152157
$this->assertEvents(5);
153158
}
154-
public function test_execute_many_by_facade_int_with_instantiated_class()
159+
160+
public function test_execute_many_by_facade_int_with_instantiated_class()
155161
{
156162
$result = Mockery::mock(PromiseInterface::class)
157163
->shouldReceive('wait')
@@ -167,7 +173,8 @@ public function test_execute_many_by_facade_int_with_instantiated_class()
167173

168174
$this->assertEvents(5);
169175
}
170-
public function test_execute_many_async_by_function()
176+
177+
public function test_execute_many_async_by_function()
171178
{
172179
$result = Mockery::mock(PromiseInterface::class)
173180
->shouldNotReceive('wait')

0 commit comments

Comments
 (0)