コード例 #1
0
 /**
  * {@inheritDoc}
  * @see \Codeception\Module::_beforeSuite()
  */
 public function _beforeSuite($settings = [])
 {
     $this->config = array_merge($this->config, $settings);
     Debug::debug("Connecting to WireMock in: host {$this->config['host']} and port {$this->config['port']}");
     $this->wireMock = WireMockClient::create($this->config['host'], $this->config['port']);
 }
コード例 #2
0
 /**
  * Class destructor.
  */
 public function __destruct()
 {
     $connection = WireMockClient::create('localhost', $this->config['port']);
     if ($connection->isAlive()) {
         $connection->shutdownServer();
     }
     $this->process->stop();
 }