|
12 | 12 | use OCP\Encryption\IEncryptionModule; |
13 | 13 | use OCP\Encryption\IManager; |
14 | 14 | use OCP\IConfig; |
| 15 | +use PHPUnit\Framework\MockObject\MockObject; |
15 | 16 | use Symfony\Component\Console\Helper\QuestionHelper; |
16 | 17 | use Symfony\Component\Console\Input\InputInterface; |
17 | 18 | use Symfony\Component\Console\Output\OutputInterface; |
@@ -45,26 +46,16 @@ class EncryptAllTest extends TestCase { |
45 | 46 | protected function setUp(): void { |
46 | 47 | parent::setUp(); |
47 | 48 |
|
48 | | - $this->config = $this->getMockBuilder(IConfig::class) |
49 | | - ->disableOriginalConstructor() |
50 | | - ->getMock(); |
51 | | - $this->encryptionManager = $this->getMockBuilder(IManager::class) |
52 | | - ->disableOriginalConstructor() |
53 | | - ->getMock(); |
54 | | - $this->appManager = $this->getMockBuilder(IAppManager::class) |
55 | | - ->disableOriginalConstructor() |
56 | | - ->getMock(); |
57 | | - $this->encryptionModule = $this->getMockBuilder(IEncryptionModule::class) |
58 | | - ->disableOriginalConstructor() |
59 | | - ->getMock(); |
60 | | - $this->questionHelper = $this->getMockBuilder(QuestionHelper::class) |
61 | | - ->disableOriginalConstructor() |
62 | | - ->getMock(); |
63 | | - $this->consoleInput = $this->getMockBuilder(InputInterface::class)->getMock(); |
| 49 | + $this->config = $this->createMock(IConfig::class); |
| 50 | + $this->encryptionManager = $this->createMock(IManager::class); |
| 51 | + $this->appManager = $this->createMock(IAppManager::class); |
| 52 | + $this->encryptionModule = $this->createMock(IEncryptionModule::class); |
| 53 | + $this->questionHelper = $this->createMock(QuestionHelper::class); |
| 54 | + $this->consoleInput = $this->createMock(InputInterface::class); |
64 | 55 | $this->consoleInput->expects($this->any()) |
65 | 56 | ->method('isInteractive') |
66 | 57 | ->willReturn(true); |
67 | | - $this->consoleOutput = $this->getMockBuilder(OutputInterface::class)->getMock(); |
| 58 | + $this->consoleOutput = $this->createMock(OutputInterface::class); |
68 | 59 | } |
69 | 60 |
|
70 | 61 | public function testEncryptAll(): void { |
|
0 commit comments