MemoryTest.php 529 B

1234567891011121314151617181920212223
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace Test\Session;
  8. class MemoryTest extends Session {
  9. protected function setUp(): void {
  10. parent::setUp();
  11. $this->instance = new \OC\Session\Memory();
  12. }
  13. public function testThrowsExceptionOnGetId(): void {
  14. $this->expectException(\OCP\Session\Exceptions\SessionNotAvailableException::class);
  15. $this->instance->getId();
  16. }
  17. }