Skip to content

Commit d898cef

Browse files
authored
[8.x] Clarifies parallel testing token type (#39403)
* Fixes token type * Improves test
1 parent ac399a4 commit d898cef

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Illuminate/Testing/ParallelTesting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ public function option($option)
257257
/**
258258
* Gets a unique test token.
259259
*
260-
* @return int|false
260+
* @return string|false
261261
*/
262262
public function token()
263263
{

tests/Testing/ParallelTestingTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ public function testCallbacks($callback)
3636
$this->assertNull($testCase);
3737
}
3838

39-
$this->assertEquals(1, $token);
39+
$this->assertSame('1', $token);
4040
$state = true;
4141
});
4242

4343
$parallelTesting->{$caller}($this);
4444
$this->assertFalse($state);
4545

4646
$parallelTesting->resolveTokenUsing(function () {
47-
return 1;
47+
return '1';
4848
});
4949

5050
$parallelTesting->{$caller}($this);
@@ -80,10 +80,10 @@ public function testToken()
8080
$this->assertFalse($parallelTesting->token());
8181

8282
$parallelTesting->resolveTokenUsing(function () {
83-
return 1;
83+
return '1';
8484
});
8585

86-
$this->assertSame(1, $parallelTesting->token());
86+
$this->assertSame('1', $parallelTesting->token());
8787
}
8888

8989
public function callbacks()

0 commit comments

Comments
 (0)