public function testGetAppsForUser() { $user = new User('user1', null); $this->groupManager->expects($this->any())->method('getUserGroupIds')->with($user)->will($this->returnValue(array('foo', 'bar'))); $this->appConfig->setValue('test1', 'enabled', 'yes'); $this->appConfig->setValue('test2', 'enabled', 'no'); $this->appConfig->setValue('test3', 'enabled', '["foo"]'); $this->appConfig->setValue('test4', 'enabled', '["asd"]'); $this->assertEquals(['dav', 'federatedfilesharing', 'files', 'test1', 'test3'], $this->manager->getEnabledAppsForUser($user)); }