private function setNamespaces() { $this->dic['clusterNamespace'] = ClusterNamespace::build(); $this->dic['indicesNamespace'] = IndicesNamespace::build(); $this->dic['nodesNamespace'] = NodesNamespace::build(); $this->dic['snapshotNamespace'] = SnapshotNamespace::build(); $this->dic['catNamespace'] = CatNamespace::build(); foreach ($this->dic['customNamespaces'] as $name => $ns) { $this->dic[$name] = $ns::build(); } }
/** * Check if the cluster is healthy, given the status of the cluster. * * @param string $status * * @return bool */ protected function isClusterHealthy($status = 'green') { $this->clusterMock->expects($this->any())->method('health')->willReturn(['status' => $status]); $this->clientMock->expects($this->any())->method('cluster')->willReturn($this->clusterMock); return $this->getElasticSearcher()->isHealthy(); }