summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2017-04-10 19:10:03 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2017-04-19 08:26:03 +0200
commit4d71d37fe353c8870b6f4f50e21b37dbe0ae864c (patch)
treee787e76912d8132bd948be55f1422816c7c57031
parent03233b1d58a3ff100196393321aa7cff9727dd91 (diff)
downloadnextcloud-server-4d71d37fe353c8870b6f4f50e21b37dbe0ae864c.tar.gz
nextcloud-server-4d71d37fe353c8870b6f4f50e21b37dbe0ae864c.zip
Reorganize method position inside class
For consistency with the rest of private methods in the class, "isContainerRegistered" is moved below the only public method in which it is used ("cleanUp"). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--build/acceptance/features/core/NextcloudTestServerDockerHelper.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/build/acceptance/features/core/NextcloudTestServerDockerHelper.php b/build/acceptance/features/core/NextcloudTestServerDockerHelper.php
index 71c7f9ad850..69dafc2276b 100644
--- a/build/acceptance/features/core/NextcloudTestServerDockerHelper.php
+++ b/build/acceptance/features/core/NextcloudTestServerDockerHelper.php
@@ -192,6 +192,21 @@ class NextcloudTestServerDockerHelper {
}
/**
+ * Returns whether the container exists (no matter its state) or not.
+ *
+ * @return boolean true if the container exists, false otherwise.
+ * @throws \Exception if the Docker command failed to execute.
+ */
+ private function isContainerRegistered() {
+ // With the "--quiet" option "docker ps" only shows the ID of the
+ // matching containers, without table headers. Therefore, if the
+ // container does not exist the output will be empty (not even a new
+ // line, as the last line of output returned by "executeDockerCommand"
+ // does not include a trailing new line character).
+ return $this->executeDockerCommand("ps --all --quiet --filter 'name=" . $this->containerName . "'") !== "";
+ }
+
+ /**
* Returns the base URL of the Nextcloud test server.
*
* @return string the base URL of the Nextcloud test server.
@@ -215,21 +230,6 @@ class NextcloudTestServerDockerHelper {
}
/**
- * Returns whether the container exists (no matter its state) or not.
- *
- * @return boolean true if the container exists, false otherwise.
- * @throws \Exception if the Docker command failed to execute.
- */
- private function isContainerRegistered() {
- // With the "--quiet" option "docker ps" only shows the ID of the
- // matching containers, without table headers. Therefore, if the
- // container does not exist the output will be empty (not even a new
- // line, as the last line of output returned by "executeDockerCommand"
- // does not include a trailing new line character).
- return $this->executeDockerCommand("ps --all --quiet --filter 'name=" . $this->containerName . "'") !== "";
- }
-
- /**
* Executes the given Docker command.
*
* @return string the last line of output, without trailing new line