summaryrefslogtreecommitdiffstats
path: root/apps/encryption/tests
diff options
context:
space:
mode:
Diffstat (limited to 'apps/encryption/tests')
-rw-r--r--apps/encryption/tests/Controller/RecoveryControllerTest.php8
-rw-r--r--apps/encryption/tests/Controller/SettingsControllerTest.php4
-rw-r--r--apps/encryption/tests/Controller/StatusControllerTest.php4
-rw-r--r--apps/encryption/tests/Crypto/EncryptionTest.php4
-rw-r--r--apps/encryption/tests/Hooks/UserHooksTest.php2
-rw-r--r--apps/encryption/tests/RecoveryTest.php6
-rw-r--r--apps/encryption/tests/SessionTest.php6
-rw-r--r--apps/encryption/tests/UtilTest.php6
8 files changed, 20 insertions, 20 deletions
diff --git a/apps/encryption/tests/Controller/RecoveryControllerTest.php b/apps/encryption/tests/Controller/RecoveryControllerTest.php
index e3614b918c3..c6f7a8649b6 100644
--- a/apps/encryption/tests/Controller/RecoveryControllerTest.php
+++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php
@@ -108,10 +108,10 @@ class RecoveryControllerTest extends TestCase {
$this->recoveryMock->expects($this->any())
->method('changeRecoveryKeyPassword')
->with($password, $oldPassword)
- ->will($this->returnValueMap([
+ ->willReturnMap([
['test', 'oldTestFail', false],
['test', 'oldtest', true]
- ]));
+ ]);
$response = $this->controller->changeRecoveryPassword($password,
$oldPassword,
@@ -140,10 +140,10 @@ class RecoveryControllerTest extends TestCase {
$this->recoveryMock->expects($this->any())
->method('setRecoveryForUser')
->with($enableRecovery)
- ->will($this->returnValueMap([
+ ->willReturnMap([
['1', true],
['0', false]
- ]));
+ ]);
$response = $this->controller->userSetRecovery($enableRecovery);
diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php
index 62c5ebf608c..c2f67478bb7 100644
--- a/apps/encryption/tests/Controller/SettingsControllerTest.php
+++ b/apps/encryption/tests/Controller/SettingsControllerTest.php
@@ -85,9 +85,9 @@ class SettingsControllerTest extends TestCase {
$this->l10nMock->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($message) {
+ ->willReturnCallback(function($message) {
return $message;
- }));
+ });
$this->userManagerMock = $this->getMockBuilder(IUserManager::class)
->disableOriginalConstructor()->getMock();
diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php
index 8e217bfa473..f93be963989 100644
--- a/apps/encryption/tests/Controller/StatusControllerTest.php
+++ b/apps/encryption/tests/Controller/StatusControllerTest.php
@@ -63,9 +63,9 @@ class StatusControllerTest extends TestCase {
->disableOriginalConstructor()->getMock();
$this->l10nMock->expects($this->any())
->method('t')
- ->will($this->returnCallback(function($message) {
+ ->willReturnCallback(function($message) {
return $message;
- }));
+ });
$this->encryptionManagerMock = $this->createMock(IManager::class);
$this->controller = new StatusController('encryptionTest',
diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php
index 7b563c06c02..9a541880e79 100644
--- a/apps/encryption/tests/Crypto/EncryptionTest.php
+++ b/apps/encryption/tests/Crypto/EncryptionTest.php
@@ -151,10 +151,10 @@ class EncryptionTest extends TestCase {
$this->keyManagerMock->expects($this->any())
->method('getPublicKey')
- ->will($this->returnCallback([$this, 'getPublicKeyCallback']));
+ ->willReturnCallback([$this, 'getPublicKeyCallback']);
$this->keyManagerMock->expects($this->any())
->method('addSystemKeys')
- ->will($this->returnCallback([$this, 'addSystemKeysCallback']));
+ ->willReturnCallback([$this, 'addSystemKeysCallback']);
$this->cryptMock->expects($this->any())
->method('multiKeyEncrypt')
->willReturn(true);
diff --git a/apps/encryption/tests/Hooks/UserHooksTest.php b/apps/encryption/tests/Hooks/UserHooksTest.php
index 4d35d546317..53548c7ccd8 100644
--- a/apps/encryption/tests/Hooks/UserHooksTest.php
+++ b/apps/encryption/tests/Hooks/UserHooksTest.php
@@ -307,7 +307,7 @@ class UserHooksTest extends TestCase {
->disableOriginalConstructor()
->getMock();
- $userSessionMock->expects($this->any())->method('getUser')->will($this->returnValue(null));
+ $userSessionMock->expects($this->any())->method('getUser')->willReturn(null);
$this->recoveryMock->expects($this->once())
->method('isRecoveryEnabledForUser')
diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php
index a76d5f7d562..9dbc818af3a 100644
--- a/apps/encryption/tests/RecoveryTest.php
+++ b/apps/encryption/tests/RecoveryTest.php
@@ -168,7 +168,7 @@ class RecoveryTest extends TestCase {
$this->cryptMock->expects($this->once())
->method('decryptPrivateKey')
- ->will($this->returnValue(false));
+ ->willReturn(false);
$this->assertFalse($this->instance->changeRecoveryKeyPassword('password', 'passwordOld'));
}
@@ -283,11 +283,11 @@ class RecoveryTest extends TestCase {
$this->configMock->expects($this->any())
->method('setAppValue')
- ->will($this->returnCallback([$this, 'setValueTester']));
+ ->willReturnCallback([$this, 'setValueTester']);
$this->configMock->expects($this->any())
->method('getAppValue')
- ->will($this->returnCallback([$this, 'getValueTester']));
+ ->willReturnCallback([$this, 'getValueTester']);
$this->instance = new Recovery($this->userSessionMock,
$this->cryptMock,
diff --git a/apps/encryption/tests/SessionTest.php b/apps/encryption/tests/SessionTest.php
index 21de1ee971c..daa05b140da 100644
--- a/apps/encryption/tests/SessionTest.php
+++ b/apps/encryption/tests/SessionTest.php
@@ -204,15 +204,15 @@ class SessionTest extends TestCase {
$this->sessionMock->expects($this->any())
->method('set')
- ->will($this->returnCallback([$this, "setValueTester"]));
+ ->willReturnCallback([$this, "setValueTester"]);
$this->sessionMock->expects($this->any())
->method('get')
- ->will($this->returnCallback([$this, "getValueTester"]));
+ ->willReturnCallback([$this, "getValueTester"]);
$this->sessionMock->expects($this->any())
->method('remove')
- ->will($this->returnCallback([$this, "removeValueTester"]));
+ ->willReturnCallback([$this, "removeValueTester"]);
$this->instance = new Session($this->sessionMock);
diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php
index cade0b2f823..e9133055f41 100644
--- a/apps/encryption/tests/UtilTest.php
+++ b/apps/encryption/tests/UtilTest.php
@@ -75,7 +75,7 @@ class UtilTest extends TestCase {
public function testUserHasFiles() {
$this->filesMock->expects($this->once())
->method('file_exists')
- ->will($this->returnValue(true));
+ ->willReturn(true);
$this->assertTrue($this->instance->userHasFiles('admin'));
}
@@ -111,11 +111,11 @@ class UtilTest extends TestCase {
$this->configMock->expects($this->any())
->method('getUserValue')
- ->will($this->returnCallback([$this, 'getValueTester']));
+ ->willReturnCallback([$this, 'getValueTester']);
$this->configMock->expects($this->any())
->method('setUserValue')
- ->will($this->returnCallback([$this, 'setValueTester']));
+ ->willReturnCallback([$this, 'setValueTester']);
$this->instance = new Util($this->filesMock, $cryptMock, $loggerMock, $userSessionMock, $this->configMock, $this->userManagerMock);
}
585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838