Пример #1
0
 public function setUp()
 {
     $this->loop = LoopFactory::create();
     $factory = new Factory($this->loop);
     $this->client = $factory->createClient();
     $promise = $this->client->ping();
     try {
         Block\await($promise, $this->loop);
     } catch (Exception $e) {
         $this->markTestSkipped('Unable to connect to docker ' . $e->getMessage());
     }
 }
Пример #2
0
<?php

require __DIR__ . '/../vendor/autoload.php';
use React\EventLoop\Factory as LoopFactory;
use Clue\React\Docker\Factory;
$loop = LoopFactory::create();
$factory = new Factory($loop);
$client = $factory->createClient();
$client->info()->then('var_dump', 'var_dump');
$loop->run();