Make TestCase->overwriteService() work with App classes
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
4d8c42a4fb
commit
78abbf72b0
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