Skip to content

Commit ce1cd0a

Browse files
Rename WorkflowFacadeTest methods to testXxx for PHPUnit 10 discovery
Follow the pattern established in 01b6eef for MigrationTest: convert @test annotations to testXxx method names so PHPUnit 10 discovers them without annotation-mode configuration. Closes TD-082 (#348). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3866768 commit ce1cd0a

1 file changed

Lines changed: 18 additions & 36 deletions

File tree

tests/Unit/V2/WorkflowFacadeTest.php

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -29,48 +29,42 @@
2929
*/
3030
class WorkflowFacadeTest extends TestCase
3131
{
32-
/** @test */
33-
public function activity_returns_an_activity_call(): void
32+
public function testActivityReturnsAnActivityCall(): void
3433
{
3534
$call = Workflow::activity('App\\Activities\\Example', 'a', 'b');
3635

3736
$this->assertInstanceOf(ActivityCall::class, $call);
3837
}
3938

40-
/** @test */
41-
public function execute_activity_aliases_activity(): void
39+
public function testExecuteActivityAliasesActivity(): void
4240
{
4341
$call = Workflow::executeActivity('App\\Activities\\Example');
4442

4543
$this->assertInstanceOf(ActivityCall::class, $call);
4644
}
4745

48-
/** @test */
49-
public function child_returns_a_child_workflow_call(): void
46+
public function testChildReturnsAChildWorkflowCall(): void
5047
{
5148
$call = Workflow::child('App\\Workflows\\Example');
5249

5350
$this->assertInstanceOf(ChildWorkflowCall::class, $call);
5451
}
5552

56-
/** @test */
57-
public function execute_child_workflow_aliases_child(): void
53+
public function testExecuteChildWorkflowAliasesChild(): void
5854
{
5955
$call = Workflow::executeChildWorkflow('App\\Workflows\\Example');
6056

6157
$this->assertInstanceOf(ChildWorkflowCall::class, $call);
6258
}
6359

64-
/** @test */
65-
public function timer_returns_a_timer_call(): void
60+
public function testTimerReturnsATimerCall(): void
6661
{
6762
$call = Workflow::timer(42);
6863

6964
$this->assertInstanceOf(TimerCall::class, $call);
7065
}
7166

72-
/** @test */
73-
public function timer_sugar_methods_return_timer_calls(): void
67+
public function testTimerSugarMethodsReturnTimerCalls(): void
7468
{
7569
$this->assertInstanceOf(TimerCall::class, Workflow::seconds(5));
7670
$this->assertInstanceOf(TimerCall::class, Workflow::minutes(2));
@@ -81,62 +75,54 @@ public function timer_sugar_methods_return_timer_calls(): void
8175
$this->assertInstanceOf(TimerCall::class, Workflow::years(1));
8276
}
8377

84-
/** @test */
85-
public function await_with_signal_name_returns_signal_call(): void
78+
public function testAwaitWithSignalNameReturnsSignalCall(): void
8679
{
8780
$call = Workflow::await('some-signal');
8881

8982
$this->assertInstanceOf(SignalCall::class, $call);
9083
}
9184

92-
/** @test */
93-
public function await_signal_is_equivalent_to_await_by_name(): void
85+
public function testAwaitSignalIsEquivalentToAwaitByName(): void
9486
{
9587
$this->assertInstanceOf(SignalCall::class, Workflow::awaitSignal('some-signal'));
9688
}
9789

98-
/** @test */
99-
public function await_with_condition_returns_await_call(): void
90+
public function testAwaitWithConditionReturnsAwaitCall(): void
10091
{
10192
$call = Workflow::await(static fn (): bool => true);
10293

10394
$this->assertInstanceOf(AwaitCall::class, $call);
10495
}
10596

106-
/** @test */
107-
public function await_with_timeout_returns_await_with_timeout_call(): void
97+
public function testAwaitWithTimeoutReturnsAwaitWithTimeoutCall(): void
10898
{
10999
$call = Workflow::awaitWithTimeout(5, static fn (): bool => true);
110100

111101
$this->assertInstanceOf(AwaitWithTimeoutCall::class, $call);
112102
}
113103

114-
/** @test */
115-
public function side_effect_returns_a_side_effect_call(): void
104+
public function testSideEffectReturnsASideEffectCall(): void
116105
{
117106
$call = Workflow::sideEffect(static fn (): int => 7);
118107

119108
$this->assertInstanceOf(SideEffectCall::class, $call);
120109
}
121110

122-
/** @test */
123-
public function continue_as_new_returns_a_continue_as_new_call(): void
111+
public function testContinueAsNewReturnsAContinueAsNewCall(): void
124112
{
125113
$call = Workflow::continueAsNew('arg1', 'arg2');
126114

127115
$this->assertInstanceOf(ContinueAsNewCall::class, $call);
128116
}
129117

130-
/** @test */
131-
public function get_version_returns_a_version_call(): void
118+
public function testGetVersionReturnsAVersionCall(): void
132119
{
133120
$call = Workflow::getVersion('change-one');
134121

135122
$this->assertInstanceOf(VersionCall::class, $call);
136123
}
137124

138-
/** @test */
139-
public function all_returns_an_all_call(): void
125+
public function testAllReturnsAnAllCall(): void
140126
{
141127
$call = Workflow::all([
142128
Workflow::activity('App\\Activities\\A'),
@@ -146,16 +132,14 @@ public function all_returns_an_all_call(): void
146132
$this->assertInstanceOf(AllCall::class, $call);
147133
}
148134

149-
/** @test */
150-
public function parallel_aliases_all(): void
135+
public function testParallelAliasesAll(): void
151136
{
152137
$call = Workflow::parallel([Workflow::activity('App\\Activities\\A')]);
153138

154139
$this->assertInstanceOf(AllCall::class, $call);
155140
}
156141

157-
/** @test */
158-
public function upsert_memo_suspends_with_an_upsert_memo_call(): void
142+
public function testUpsertMemoSuspendsWithAnUpsertMemoCall(): void
159143
{
160144
// Outside a fiber, suspend returns the call instance; upsertMemo is
161145
// typed void, so we can only assert it does not error.
@@ -166,8 +150,7 @@ public function upsert_memo_suspends_with_an_upsert_memo_call(): void
166150
$this->assertInstanceOf(UpsertMemoCall::class, new UpsertMemoCall(['a' => 1]));
167151
}
168152

169-
/** @test */
170-
public function upsert_search_attributes_suspends_with_the_right_call(): void
153+
public function testUpsertSearchAttributesSuspendsWithTheRightCall(): void
171154
{
172155
Workflow::upsertSearchAttributes(['region' => 'us']);
173156
$this->assertTrue(true);
@@ -178,8 +161,7 @@ public function upsert_search_attributes_suspends_with_the_right_call(): void
178161
);
179162
}
180163

181-
/** @test */
182-
public function every_facade_method_is_static(): void
164+
public function testEveryFacadeMethodIsStatic(): void
183165
{
184166
$facadeMethods = [
185167
'activity',

0 commit comments

Comments
 (0)