Merge pull request #14191 from nextcloud/bugfix/noid/make-testcase-overwrite-service-work-with-app-classes
Make TestCase->overwriteService() work with App classes
This commit is contained in:
commit
f3dc0d32db
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue