Skip to content

Commit 2426705

Browse files
committed
Fix errors on tests
1 parent d8f077d commit 2426705

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/Terremoth/Async/background_processor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Laravel\SerializableClosure\SerializableClosure;
1414

1515
if (!isset($argv[1])) {
16-
custom_error('Shmop Key not provided');
16+
customError('Shmop Key not provided');
1717
exit(1);
1818
}
1919

@@ -22,14 +22,14 @@
2222
$shmopInstance = shmop_open($key, 'a', 0, 0);
2323

2424
if (!$shmopInstance) {
25-
custom_error('Could not open Shmop');
25+
customError('Could not open Shmop');
2626
exit(1);
2727
}
2828

2929
$length = shmop_size($shmopInstance);
3030

3131
if ($length === 0) {
32-
custom_error('Shmop length cannot be zero!');
32+
customError('Shmop length cannot be zero!');
3333
exit(1);
3434
}
3535

src/Terremoth/Async/script_functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Terremoth\Async;
44

5-
function custom_error(string $error): void
5+
function customError(string $error): void
66
{
77
$error = 'Error: ' . $error;
88
fwrite(STDERR, $error);

tests/Terremoth/AsyncTest/ProcessTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function testSendActuallyWritesSerializedClosureToShmop(): void
7676

7777
public function testSendThrowsWhenShmopCannotBeCreated(): void
7878
{
79-
$badKey = PHP_INT_MAX;
79+
$badKey = -1; // impossible key
8080

8181
$process = new Process($badKey);
8282

tests/Terremoth/AsyncTest/ScriptFunctionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/**
1010
* @covers \Terremoth\Async\stringFromMemoryBlock
11-
* @covers \Terremoth\Async\error
11+
* @covers \Terremoth\Async\customError
1212
*/
1313
class ScriptFunctionsTest extends TestCase
1414
{

0 commit comments

Comments
 (0)