summaryrefslogtreecommitdiffstats
path: root/tests/lib/InstallerTest.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-06-20 10:53:06 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-06-20 10:53:06 +0200
commit6a1510f8ee48494a19dc1239fd2584dc2188e18d (patch)
tree44268aa4e7afce7531cddb4cf91f3a72bbca4c13 /tests/lib/InstallerTest.php
parentc7e1c36362a7e4de5a7d074ab43f97c2559e06ea (diff)
downloadnextcloud-server-6a1510f8ee48494a19dc1239fd2584dc2188e18d.tar.gz
nextcloud-server-6a1510f8ee48494a19dc1239fd2584dc2188e18d.zip
Remove some more at matchers in tests/lib
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'tests/lib/InstallerTest.php')
-rw-r--r--tests/lib/InstallerTest.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/lib/InstallerTest.php b/tests/lib/InstallerTest.php
index c49f8bf76a5..352580337ad 100644
--- a/tests/lib/InstallerTest.php
+++ b/tests/lib/InstallerTest.php
@@ -340,7 +340,7 @@ u/spPSSVhaun5BA1FlphB2TkgnzlCmxJa63nFY045e/Jq+IKMcqqZl/092gbI2EQ
$realTmpFile = \OC::$server->getTempManager()->getTemporaryFile('.tar.gz');
copy(__DIR__ . '/../data/testapp.tar.gz', $realTmpFile);
$this->tempManager
- ->expects($this->at(0))
+ ->expects($this->once())
->method('getTemporaryFile')
->with('.tar.gz')
->willReturn($realTmpFile);
@@ -418,14 +418,14 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
$realTmpFile = \OC::$server->getTempManager()->getTemporaryFile('.tar.gz');
copy(__DIR__ . '/../data/testapp1.tar.gz', $realTmpFile);
$this->tempManager
- ->expects($this->at(0))
+ ->expects($this->once())
->method('getTemporaryFile')
->with('.tar.gz')
->willReturn($realTmpFile);
$realTmpFolder = \OC::$server->getTempManager()->getTemporaryFolder();
mkdir($realTmpFolder . '/testfolder');
$this->tempManager
- ->expects($this->at(1))
+ ->expects($this->once())
->method('getTemporaryFolder')
->willReturn($realTmpFolder);
$client = $this->createMock(IClient::class);
@@ -502,13 +502,13 @@ YwDVP+QmNRzx72jtqAN/Kc3CvQ9nkgYhU65B95aX0xA=',
$realTmpFile = \OC::$server->getTempManager()->getTemporaryFile('.tar.gz');
copy(__DIR__ . '/../data/testapp1.tar.gz', $realTmpFile);
$this->tempManager
- ->expects($this->at(0))
+ ->expects($this->once())
->method('getTemporaryFile')
->with('.tar.gz')
->willReturn($realTmpFile);
$realTmpFolder = \OC::$server->getTempManager()->getTemporaryFolder();
$this->tempManager
- ->expects($this->at(1))
+ ->expects($this->once())
->method('getTemporaryFolder')
->willReturn($realTmpFolder);
$client = $this->createMock(IClient::class);
@@ -575,30 +575,30 @@ MPLX6f5V9tCJtlH6ztmEcDROfvuVc0U3rEhqx2hphoyo+MZrPFpdcJL8KkIdMKbY
],
];
$this->appFetcher
- ->expects($this->at(0))
+ ->expects($this->atLeastOnce())
->method('get')
- ->willReturn($appArray);
+ ->willReturnOnConsecutiveCalls($appArray);
$realTmpFile = \OC::$server->getTempManager()->getTemporaryFile('.tar.gz');
copy(__DIR__ . '/../data/testapp.tar.gz', $realTmpFile);
$this->tempManager
- ->expects($this->at(0))
+ ->expects($this->atLeastOnce())
->method('getTemporaryFile')
->with('.tar.gz')
- ->willReturn($realTmpFile);
+ ->willReturnOnConsecutiveCalls($realTmpFile);
$realTmpFolder = \OC::$server->getTempManager()->getTemporaryFolder();
$this->tempManager
- ->expects($this->at(1))
+ ->expects($this->atLeastOnce())
->method('getTemporaryFolder')
- ->willReturn($realTmpFolder);
+ ->willReturnOnConsecutiveCalls($realTmpFolder);
$client = $this->createMock(IClient::class);
$client
->expects($this->once())
->method('get')
->with('https://example.com', ['sink' => $realTmpFile, 'timeout' => 120]);
$this->clientService
- ->expects($this->at(0))
+ ->expects($this->atLeastOnce())
->method('newClient')
- ->willReturn($client);
+ ->willReturnOnConsecutiveCalls($client);
$installer = $this->getInstaller();
$installer->downloadApp('testapp');