diff options
Diffstat (limited to 'tests/lib/IntegrityCheck/CheckerTest.php')
-rw-r--r-- | tests/lib/IntegrityCheck/CheckerTest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/lib/IntegrityCheck/CheckerTest.php b/tests/lib/IntegrityCheck/CheckerTest.php index 8414a531464..fc540707c70 100644 --- a/tests/lib/IntegrityCheck/CheckerTest.php +++ b/tests/lib/IntegrityCheck/CheckerTest.php @@ -8,6 +8,7 @@ namespace Test\IntegrityCheck; use OC\Core\Command\Maintenance\Mimetype\GenerateMimetypeFileBuilder; +use OC\Files\Type\Detection; use OC\IntegrityCheck\Checker; use OC\IntegrityCheck\Helpers\AppLocator; use OC\IntegrityCheck\Helpers\EnvironmentHelper; @@ -54,7 +55,7 @@ class CheckerTest extends TestCase { $this->appConfig = $this->createMock(IAppConfig::class); $this->cacheFactory = $this->createMock(ICacheFactory::class); $this->appManager = $this->createMock(IAppManager::class); - $this->mimeTypeDetector = $this->createMock(\OC\Files\Type\Detection::class); + $this->mimeTypeDetector = $this->createMock(Detection::class); $this->config->method('getAppValue') ->willReturnArgument(2); @@ -111,7 +112,7 @@ class CheckerTest extends TestCase { $this->fileAccessHelper ->expects($this->once()) ->method('file_put_contents') - ->will($this->throwException(new \Exception('Exception message'))); + ->willThrowException(new \Exception('Exception message')); $keyBundle = file_get_contents(__DIR__ . '/../../data/integritycheck/SomeApp.crt'); $rsaPrivateKey = file_get_contents(__DIR__ . '/../../data/integritycheck/SomeApp.key'); @@ -445,7 +446,7 @@ class CheckerTest extends TestCase { $this->fileAccessHelper ->expects($this->once()) ->method('assertDirectoryExists') - ->will($this->throwException(new \Exception('Exception message'))); + ->willThrowException(new \Exception('Exception message')); $this->fileAccessHelper ->expects($this->once()) ->method('is_writable') @@ -469,7 +470,7 @@ class CheckerTest extends TestCase { $this->fileAccessHelper ->expects($this->once()) ->method('assertDirectoryExists') - ->will($this->throwException(new \Exception('Exception message'))); + ->willThrowException(new \Exception('Exception message')); $this->fileAccessHelper ->expects($this->once()) ->method('is_writable') |