Skip to content

Commit 9496cef

Browse files
committed
added test folder
Signed-off-by: sergiu <[email protected]>
1 parent 62499b5 commit 9496cef

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
"scripts": {
7575
"check": [
7676
"@cs-check",
77-
"@test"
77+
"@test",
78+
"@static-analysis"
7879
],
7980
"cs-check": "phpcs",
8081
"cs-fix": "phpcbf",

src/Swoole/ServerFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function __invoke(ContainerInterface $container): SwooleServer
106106

107107
$enableCoroutine = $swooleConfig['enable_coroutine'] ?? false;
108108
if ($enableCoroutine) {
109-
SwooleRuntime::enableCoroutine();
109+
SwooleRuntime::enableCoroutine(true);
110110
}
111111

112112
$httpServer = new SwooleServer($host, $port, $mode, $protocol);

test/SwooleConfigProviderTest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace DotTest\Mail;
6+
7+
use PHPUnit\Framework\TestCase;
8+
use Queue\Swoole\ConfigProvider;
9+
10+
class SwooleConfigProviderTest extends TestCase
11+
{
12+
private array $config;
13+
14+
public function setUp(): void
15+
{
16+
$this->config = (new ConfigProvider())();
17+
}
18+
19+
public function testHasDependencies(): void
20+
{
21+
$this->assertArrayHasKey('dependencies', $this->config);
22+
}
23+
}

0 commit comments

Comments
 (0)