mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-25 04:09:11 -04:00
ALPHA 3.0.2
This commit is contained in:
@@ -55,26 +55,24 @@ class ServerDumperTest extends TestCase
|
||||
|
||||
$dumped = null;
|
||||
$process = $this->getServerProcess();
|
||||
$process->start(function ($type, $buffer) use ($process, &$dumped) {
|
||||
$process->start(function ($type, $buffer) use ($process, &$dumped, $dumper, $data) {
|
||||
if (Process::ERR === $type) {
|
||||
$process->stop();
|
||||
$this->fail();
|
||||
} elseif ("READY\n" === $buffer) {
|
||||
$dumper->dump($data);
|
||||
} else {
|
||||
$dumped .= $buffer;
|
||||
}
|
||||
});
|
||||
|
||||
sleep(3);
|
||||
|
||||
$dumper->dump($data);
|
||||
|
||||
$process->wait();
|
||||
|
||||
$this->assertTrue($process->isSuccessful());
|
||||
$this->assertStringMatchesFormat(<<<'DUMP'
|
||||
(3) "foo"
|
||||
[
|
||||
"timestamp" => %d
|
||||
"timestamp" => %d.%d
|
||||
"foo_provider" => [
|
||||
(3) "foo"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user