function testConnect() { $complete = false; (new NativeReactor())->run(function ($reactor) use(&$complete) { $db = new Pool("host=" . DB_HOST . ";user="******";pass="******";db=connectiontest", null, $reactor); (yield $db->init()); // force waiting for connection /* use an alternative charset... Default is utf8mb4_general_ci */ $db->setCharset("latin1_general_ci"); $complete = true; }); $this->assertEquals(true, $complete, "Database commands did not complete."); }