Make TestCase->overwriteService() work with App classes

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2019-02-14 08:40:21 +01:00
parent 4d8c42a4fb
commit 78abbf72b0
No known key found for this signature in database
GPG key ID: 7076EA9751AACDDA

View file

@ -107,6 +107,10 @@ class ServerContainer extends SimpleContainer {
public function query($name) {
$name = $this->sanitizeName($name);
if (isset($this[$name])) {
return $this[$name];
}
// In case the service starts with OCA\ we try to find the service in
// the apps container first.
if (strpos($name, 'OCA\\') === 0 && substr_count($name, '\\') >= 2) {