public static function shutdownApplicationServer()
 {
     self::$clientClassesLoader && ClassLoader::removeLoader(self::$clientClassesLoader);
     // Send shutdown message (this is not supported by live servers
     // but functionality added via EascMessageFactory::setHandler())
     try {
         $s = new Socket(self::$bindAddress[0], self::$bindAddress[1]);
         $s->connect();
         $s->write(pack('Nc4Na*', DEFAULT_PROTOCOL_MAGIC_NUMBER, 1, 0, 61, FALSE, 0, NULL));
         $s->close();
     } catch (Throwable $e) {
         // Fall through, below should terminate the process anyway
     }
     $status = self::$serverProcess->out->readLine();
     if (!strlen($status) || '+' != $status[0]) {
         while ($l = self::$serverProcess->out->readLine()) {
             $status .= $l;
         }
         while ($l = self::$serverProcess->err->readLine()) {
             $status .= $l;
         }
         self::$serverProcess->close();
         throw new IllegalStateException($status);
     }
     self::$serverProcess->close();
 }
 /**
  * Tear down this test. Removes classloader delegates registered 
  * during setUp()
  */
 public function tearDown()
 {
     ClassLoader::removeLoader($this->libraryLoader);
     ClassLoader::removeLoader($this->containedLoader);
     ClassLoader::removeLoader($this->brokenLoader);
 }
Example #3
0
 /**
  * Tear down this test. Removes classloader delegates registered 
  * during setUp()
  *
  * @return void
  */
 public function tearDown()
 {
     ClassLoader::removeLoader($this->libraryLoader);
 }
 /**
  * Removes all registered paths
  *
  */
 public function tearDown()
 {
     foreach ($this->registered as $l) {
         ClassLoader::removeLoader($l);
     }
 }
 /**
  * Removes class loader
  */
 public function tearDown()
 {
     ClassLoader::removeLoader($this->cl);
 }