1
0

CheckSetupControllerTest.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2015 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCA\Settings\Tests\Controller;
  8. use OC\IntegrityCheck\Checker;
  9. use OCA\Settings\Controller\CheckSetupController;
  10. use OCP\AppFramework\Http;
  11. use OCP\AppFramework\Http\DataDisplayResponse;
  12. use OCP\AppFramework\Http\DataResponse;
  13. use OCP\AppFramework\Http\RedirectResponse;
  14. use OCP\IConfig;
  15. use OCP\IL10N;
  16. use OCP\IRequest;
  17. use OCP\IURLGenerator;
  18. use OCP\SetupCheck\ISetupCheckManager;
  19. use PHPUnit\Framework\MockObject\MockObject;
  20. use Psr\Log\LoggerInterface;
  21. use Test\TestCase;
  22. /**
  23. * Class CheckSetupControllerTest
  24. *
  25. * @backupStaticAttributes
  26. * @package Tests\Settings\Controller
  27. */
  28. class CheckSetupControllerTest extends TestCase {
  29. /** @var CheckSetupController | \PHPUnit\Framework\MockObject\MockObject */
  30. private $checkSetupController;
  31. /** @var IRequest | \PHPUnit\Framework\MockObject\MockObject */
  32. private $request;
  33. /** @var IConfig | \PHPUnit\Framework\MockObject\MockObject */
  34. private $config;
  35. /** @var IURLGenerator | \PHPUnit\Framework\MockObject\MockObject */
  36. private $urlGenerator;
  37. /** @var IL10N | \PHPUnit\Framework\MockObject\MockObject */
  38. private $l10n;
  39. /** @var LoggerInterface */
  40. private $logger;
  41. /** @var Checker|\PHPUnit\Framework\MockObject\MockObject */
  42. private $checker;
  43. /** @var ISetupCheckManager|MockObject */
  44. private $setupCheckManager;
  45. protected function setUp(): void {
  46. parent::setUp();
  47. $this->request = $this->getMockBuilder(IRequest::class)
  48. ->disableOriginalConstructor()->getMock();
  49. $this->config = $this->getMockBuilder(IConfig::class)
  50. ->disableOriginalConstructor()->getMock();
  51. $this->urlGenerator = $this->getMockBuilder(IURLGenerator::class)
  52. ->disableOriginalConstructor()->getMock();
  53. $this->l10n = $this->getMockBuilder(IL10N::class)
  54. ->disableOriginalConstructor()->getMock();
  55. $this->l10n->expects($this->any())
  56. ->method('t')
  57. ->willReturnCallback(function ($message, array $replace) {
  58. return vsprintf($message, $replace);
  59. });
  60. $this->checker = $this->getMockBuilder('\OC\IntegrityCheck\Checker')
  61. ->disableOriginalConstructor()->getMock();
  62. $this->logger = $this->getMockBuilder(LoggerInterface::class)->getMock();
  63. $this->setupCheckManager = $this->createMock(ISetupCheckManager::class);
  64. $this->checkSetupController = $this->getMockBuilder(CheckSetupController::class)
  65. ->setConstructorArgs([
  66. 'settings',
  67. $this->request,
  68. $this->config,
  69. $this->urlGenerator,
  70. $this->l10n,
  71. $this->checker,
  72. $this->logger,
  73. $this->setupCheckManager,
  74. ])
  75. ->setMethods([
  76. 'getCurlVersion',
  77. 'isPhpOutdated',
  78. 'isPHPMailerUsed',
  79. ])->getMock();
  80. }
  81. public function testCheck(): void {
  82. $this->config->expects($this->any())
  83. ->method('getAppValue')
  84. ->willReturnMap([
  85. ['files_external', 'user_certificate_scan', '', '["a", "b"]'],
  86. ['dav', 'needs_system_address_book_sync', 'no', 'no'],
  87. ]);
  88. $this->config->expects($this->any())
  89. ->method('getSystemValue')
  90. ->willReturnMap([
  91. ['connectivity_check_domains', ['www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org'], ['www.nextcloud.com', 'www.startpage.com', 'www.eff.org', 'www.edri.org']],
  92. ['memcache.local', null, 'SomeProvider'],
  93. ['has_internet_connection', true, true],
  94. ['appstoreenabled', true, false],
  95. ]);
  96. $this->request->expects($this->never())
  97. ->method('getHeader');
  98. $this->urlGenerator->method('linkToDocs')
  99. ->willReturnCallback(function (string $key): string {
  100. if ($key === 'admin-performance') {
  101. return 'http://docs.example.org/server/go.php?to=admin-performance';
  102. }
  103. if ($key === 'admin-security') {
  104. return 'https://docs.example.org/server/8.1/admin_manual/configuration_server/hardening.html';
  105. }
  106. if ($key === 'admin-reverse-proxy') {
  107. return 'reverse-proxy-doc-link';
  108. }
  109. if ($key === 'admin-code-integrity') {
  110. return 'http://docs.example.org/server/go.php?to=admin-code-integrity';
  111. }
  112. if ($key === 'admin-db-conversion') {
  113. return 'http://docs.example.org/server/go.php?to=admin-db-conversion';
  114. }
  115. return '';
  116. });
  117. $this->urlGenerator->method('getAbsoluteURL')
  118. ->willReturnCallback(function (string $url): string {
  119. if ($url === 'index.php/settings/admin') {
  120. return 'https://server/index.php/settings/admin';
  121. }
  122. if ($url === 'index.php') {
  123. return 'https://server/index.php';
  124. }
  125. return '';
  126. });
  127. $expected = new DataResponse(
  128. [
  129. 'generic' => [],
  130. ]
  131. );
  132. $this->assertEquals($expected, $this->checkSetupController->check());
  133. }
  134. public function testRescanFailedIntegrityCheck(): void {
  135. $this->checker
  136. ->expects($this->once())
  137. ->method('runInstanceVerification');
  138. $this->urlGenerator
  139. ->expects($this->once())
  140. ->method('linkToRoute')
  141. ->with('settings.AdminSettings.index')
  142. ->willReturn('/admin');
  143. $expected = new RedirectResponse('/admin');
  144. $this->assertEquals($expected, $this->checkSetupController->rescanFailedIntegrityCheck());
  145. }
  146. public function testGetFailedIntegrityCheckDisabled(): void {
  147. $this->checker
  148. ->expects($this->once())
  149. ->method('isCodeCheckEnforced')
  150. ->willReturn(false);
  151. $expected = new DataDisplayResponse('Integrity checker has been disabled. Integrity cannot be verified.');
  152. $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles());
  153. }
  154. public function testGetFailedIntegrityCheckFilesWithNoErrorsFound(): void {
  155. $this->checker
  156. ->expects($this->once())
  157. ->method('isCodeCheckEnforced')
  158. ->willReturn(true);
  159. $this->checker
  160. ->expects($this->once())
  161. ->method('getResults')
  162. ->willReturn([]);
  163. $expected = new DataDisplayResponse(
  164. 'No errors have been found.',
  165. Http::STATUS_OK,
  166. [
  167. 'Content-Type' => 'text/plain',
  168. ]
  169. );
  170. $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles());
  171. }
  172. public function testGetFailedIntegrityCheckFilesWithSomeErrorsFound(): void {
  173. $this->checker
  174. ->expects($this->once())
  175. ->method('isCodeCheckEnforced')
  176. ->willReturn(true);
  177. $this->checker
  178. ->expects($this->once())
  179. ->method('getResults')
  180. ->willReturn([ 'core' => [ 'EXTRA_FILE' => ['/testfile' => []], 'INVALID_HASH' => [ '/.idea/workspace.xml' => [ 'expected' => 'f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216', 'current' => 'ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094', ], '/lib/private/integritycheck/checker.php' => [ 'expected' => 'c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea', 'current' => '88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585', ], '/settings/controller/checksetupcontroller.php' => [ 'expected' => '3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4', 'current' => '09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a', ], ], ], 'bookmarks' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'dav' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'encryption' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'federation' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_antivirus' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_drop' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_external' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_pdfviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_sharing' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_trashbin' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_versions' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'files_videoviewer' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'firstrunwizard' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'gitsmart' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'logreader' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature could not get verified.', ], ], 'password_policy' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'provisioning_api' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'sketch' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'threatblock' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'two_factor_auth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_ldap' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], 'user_shibboleth' => [ 'EXCEPTION' => [ 'class' => 'OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException', 'message' => 'Signature data not found.', ], ], ]);
  181. $expected = new DataDisplayResponse(
  182. 'Technical information
  183. =====================
  184. The following list covers which files have failed the integrity check. Please read
  185. the previous linked documentation to learn more about the errors and how to fix
  186. them.
  187. Results
  188. =======
  189. - core
  190. - EXTRA_FILE
  191. - /testfile
  192. - INVALID_HASH
  193. - /.idea/workspace.xml
  194. - /lib/private/integritycheck/checker.php
  195. - /settings/controller/checksetupcontroller.php
  196. - bookmarks
  197. - EXCEPTION
  198. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  199. - Signature data not found.
  200. - dav
  201. - EXCEPTION
  202. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  203. - Signature data not found.
  204. - encryption
  205. - EXCEPTION
  206. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  207. - Signature data not found.
  208. - external
  209. - EXCEPTION
  210. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  211. - Signature data not found.
  212. - federation
  213. - EXCEPTION
  214. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  215. - Signature data not found.
  216. - files
  217. - EXCEPTION
  218. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  219. - Signature data not found.
  220. - files_antivirus
  221. - EXCEPTION
  222. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  223. - Signature data not found.
  224. - files_drop
  225. - EXCEPTION
  226. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  227. - Signature data not found.
  228. - files_external
  229. - EXCEPTION
  230. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  231. - Signature data not found.
  232. - files_pdfviewer
  233. - EXCEPTION
  234. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  235. - Signature data not found.
  236. - files_sharing
  237. - EXCEPTION
  238. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  239. - Signature data not found.
  240. - files_trashbin
  241. - EXCEPTION
  242. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  243. - Signature data not found.
  244. - files_versions
  245. - EXCEPTION
  246. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  247. - Signature data not found.
  248. - files_videoviewer
  249. - EXCEPTION
  250. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  251. - Signature data not found.
  252. - firstrunwizard
  253. - EXCEPTION
  254. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  255. - Signature data not found.
  256. - gitsmart
  257. - EXCEPTION
  258. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  259. - Signature data not found.
  260. - logreader
  261. - EXCEPTION
  262. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  263. - Signature could not get verified.
  264. - password_policy
  265. - EXCEPTION
  266. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  267. - Signature data not found.
  268. - provisioning_api
  269. - EXCEPTION
  270. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  271. - Signature data not found.
  272. - sketch
  273. - EXCEPTION
  274. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  275. - Signature data not found.
  276. - threatblock
  277. - EXCEPTION
  278. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  279. - Signature data not found.
  280. - two_factor_auth
  281. - EXCEPTION
  282. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  283. - Signature data not found.
  284. - user_ldap
  285. - EXCEPTION
  286. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  287. - Signature data not found.
  288. - user_shibboleth
  289. - EXCEPTION
  290. - OC\IntegrityCheck\Exceptions\InvalidSignatureException
  291. - Signature data not found.
  292. Raw output
  293. ==========
  294. Array
  295. (
  296. [core] => Array
  297. (
  298. [EXTRA_FILE] => Array
  299. (
  300. [/testfile] => Array
  301. (
  302. )
  303. )
  304. [INVALID_HASH] => Array
  305. (
  306. [/.idea/workspace.xml] => Array
  307. (
  308. [expected] => f1c5e2630d784bc9cb02d5a28f55d6f24d06dae2a0fee685f3c2521b050955d9d452769f61454c9ddfa9c308146ade10546cfa829794448eaffbc9a04a29d216
  309. [current] => ce08bf30bcbb879a18b49239a9bec6b8702f52452f88a9d32142cad8d2494d5735e6bfa0d8642b2762c62ca5be49f9bf4ec231d4a230559d4f3e2c471d3ea094
  310. )
  311. [/lib/private/integritycheck/checker.php] => Array
  312. (
  313. [expected] => c5a03bacae8dedf8b239997901ba1fffd2fe51271d13a00cc4b34b09cca5176397a89fc27381cbb1f72855fa18b69b6f87d7d5685c3b45aee373b09be54742ea
  314. [current] => 88a3a92c11db91dec1ac3be0e1c87f862c95ba6ffaaaa3f2c3b8f682187c66f07af3a3b557a868342ef4a271218fe1c1e300c478e6c156c5955ed53c40d06585
  315. )
  316. [/settings/controller/checksetupcontroller.php] => Array
  317. (
  318. [expected] => 3e1de26ce93c7bfe0ede7c19cb6c93cadc010340225b375607a7178812e9de163179b0dc33809f451e01f491d93f6f5aaca7929685d21594cccf8bda732327c4
  319. [current] => 09563164f9904a837f9ca0b5f626db56c838e5098e0ccc1d8b935f68fa03a25c5ec6f6b2d9e44a868e8b85764dafd1605522b4af8db0ae269d73432e9a01e63a
  320. )
  321. )
  322. )
  323. [bookmarks] => Array
  324. (
  325. [EXCEPTION] => Array
  326. (
  327. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  328. [message] => Signature data not found.
  329. )
  330. )
  331. [dav] => Array
  332. (
  333. [EXCEPTION] => Array
  334. (
  335. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  336. [message] => Signature data not found.
  337. )
  338. )
  339. [encryption] => Array
  340. (
  341. [EXCEPTION] => Array
  342. (
  343. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  344. [message] => Signature data not found.
  345. )
  346. )
  347. [external] => Array
  348. (
  349. [EXCEPTION] => Array
  350. (
  351. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  352. [message] => Signature data not found.
  353. )
  354. )
  355. [federation] => Array
  356. (
  357. [EXCEPTION] => Array
  358. (
  359. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  360. [message] => Signature data not found.
  361. )
  362. )
  363. [files] => Array
  364. (
  365. [EXCEPTION] => Array
  366. (
  367. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  368. [message] => Signature data not found.
  369. )
  370. )
  371. [files_antivirus] => Array
  372. (
  373. [EXCEPTION] => Array
  374. (
  375. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  376. [message] => Signature data not found.
  377. )
  378. )
  379. [files_drop] => Array
  380. (
  381. [EXCEPTION] => Array
  382. (
  383. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  384. [message] => Signature data not found.
  385. )
  386. )
  387. [files_external] => Array
  388. (
  389. [EXCEPTION] => Array
  390. (
  391. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  392. [message] => Signature data not found.
  393. )
  394. )
  395. [files_pdfviewer] => Array
  396. (
  397. [EXCEPTION] => Array
  398. (
  399. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  400. [message] => Signature data not found.
  401. )
  402. )
  403. [files_sharing] => Array
  404. (
  405. [EXCEPTION] => Array
  406. (
  407. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  408. [message] => Signature data not found.
  409. )
  410. )
  411. [files_trashbin] => Array
  412. (
  413. [EXCEPTION] => Array
  414. (
  415. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  416. [message] => Signature data not found.
  417. )
  418. )
  419. [files_versions] => Array
  420. (
  421. [EXCEPTION] => Array
  422. (
  423. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  424. [message] => Signature data not found.
  425. )
  426. )
  427. [files_videoviewer] => Array
  428. (
  429. [EXCEPTION] => Array
  430. (
  431. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  432. [message] => Signature data not found.
  433. )
  434. )
  435. [firstrunwizard] => Array
  436. (
  437. [EXCEPTION] => Array
  438. (
  439. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  440. [message] => Signature data not found.
  441. )
  442. )
  443. [gitsmart] => Array
  444. (
  445. [EXCEPTION] => Array
  446. (
  447. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  448. [message] => Signature data not found.
  449. )
  450. )
  451. [logreader] => Array
  452. (
  453. [EXCEPTION] => Array
  454. (
  455. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  456. [message] => Signature could not get verified.
  457. )
  458. )
  459. [password_policy] => Array
  460. (
  461. [EXCEPTION] => Array
  462. (
  463. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  464. [message] => Signature data not found.
  465. )
  466. )
  467. [provisioning_api] => Array
  468. (
  469. [EXCEPTION] => Array
  470. (
  471. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  472. [message] => Signature data not found.
  473. )
  474. )
  475. [sketch] => Array
  476. (
  477. [EXCEPTION] => Array
  478. (
  479. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  480. [message] => Signature data not found.
  481. )
  482. )
  483. [threatblock] => Array
  484. (
  485. [EXCEPTION] => Array
  486. (
  487. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  488. [message] => Signature data not found.
  489. )
  490. )
  491. [two_factor_auth] => Array
  492. (
  493. [EXCEPTION] => Array
  494. (
  495. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  496. [message] => Signature data not found.
  497. )
  498. )
  499. [user_ldap] => Array
  500. (
  501. [EXCEPTION] => Array
  502. (
  503. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  504. [message] => Signature data not found.
  505. )
  506. )
  507. [user_shibboleth] => Array
  508. (
  509. [EXCEPTION] => Array
  510. (
  511. [class] => OC\IntegrityCheck\Exceptions\InvalidSignatureException
  512. [message] => Signature data not found.
  513. )
  514. )
  515. )
  516. ',
  517. Http::STATUS_OK,
  518. [
  519. 'Content-Type' => 'text/plain',
  520. ]
  521. );
  522. $this->assertEquals($expected, $this->checkSetupController->getFailedIntegrityCheckFiles());
  523. }
  524. }