diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2024-09-15 22:32:31 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2024-09-15 22:32:31 +0200 |
commit | 49dd79eabb2b8902559a7a4e8f8fcad54f46b604 (patch) | |
tree | 2af18db46ba463368dc4461d7436fb69577923de /tests/lib/TextProcessing/TextProcessingTest.php | |
parent | 4281ce6fa1bb8235426099d720734d2394bec203 (diff) | |
download | nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.tar.gz nextcloud-server-49dd79eabb2b8902559a7a4e8f8fcad54f46b604.zip |
refactor: Add void return type to PHPUnit test methods
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/TextProcessing/TextProcessingTest.php')
-rw-r--r-- | tests/lib/TextProcessing/TextProcessingTest.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/lib/TextProcessing/TextProcessingTest.php b/tests/lib/TextProcessing/TextProcessingTest.php index 9c759e52458..84c5492a4a2 100644 --- a/tests/lib/TextProcessing/TextProcessingTest.php +++ b/tests/lib/TextProcessing/TextProcessingTest.php @@ -184,7 +184,7 @@ class TextProcessingTest extends \Test\TestCase { ); } - public function testShouldNotHaveAnyProviders() { + public function testShouldNotHaveAnyProviders(): void { $this->registrationContext->expects($this->any())->method('getTextProcessingProviders')->willReturn([]); $this->assertCount(0, $this->manager->getAvailableTaskTypes()); $this->assertFalse($this->manager->hasProviders()); @@ -192,7 +192,7 @@ class TextProcessingTest extends \Test\TestCase { $this->manager->runTask(new \OCP\TextProcessing\Task(FreePromptTaskType::class, 'Hello', 'test', null)); } - public function testProviderShouldBeRegisteredAndRun() { + public function testProviderShouldBeRegisteredAndRun(): void { $this->registrationContext->expects($this->any())->method('getTextProcessingProviders')->willReturn([ new ServiceRegistration('test', SuccessfulSummaryProvider::class) ]); @@ -205,7 +205,7 @@ class TextProcessingTest extends \Test\TestCase { $this->manager->runTask(new Task(FreePromptTaskType::class, 'Hello', 'test', null)); } - public function testProviderShouldBeRegisteredAndScheduled() { + public function testProviderShouldBeRegisteredAndScheduled(): void { // register provider $this->registrationContext->expects($this->any())->method('getTextProcessingProviders')->willReturn([ new ServiceRegistration('test', SuccessfulSummaryProvider::class) @@ -256,7 +256,7 @@ class TextProcessingTest extends \Test\TestCase { $this->assertEquals(Task::STATUS_SUCCESSFUL, $task3->getStatus()); } - public function testMultipleProvidersShouldBeRegisteredAndRunCorrectly() { + public function testMultipleProvidersShouldBeRegisteredAndRunCorrectly(): void { $this->registrationContext->expects($this->any())->method('getTextProcessingProviders')->willReturn([ new ServiceRegistration('test', SuccessfulSummaryProvider::class), new ServiceRegistration('test', FreePromptProvider::class), @@ -275,12 +275,12 @@ class TextProcessingTest extends \Test\TestCase { $this->manager->runTask(new Task(TopicsTaskType::class, 'Hello', 'test', null)); } - public function testNonexistentTask() { + public function testNonexistentTask(): void { $this->expectException(NotFoundException::class); $this->manager->getTask(2147483646); } - public function testTaskFailure() { + public function testTaskFailure(): void { // register provider $this->registrationContext->expects($this->any())->method('getTextProcessingProviders')->willReturn([ new ServiceRegistration('test', FailingSummaryProvider::class), @@ -331,7 +331,7 @@ class TextProcessingTest extends \Test\TestCase { $this->assertEquals(Task::STATUS_FAILED, $task3->getStatus()); } - public function testOldTasksShouldBeCleanedUp() { + public function testOldTasksShouldBeCleanedUp(): void { $this->registrationContext->expects($this->any())->method('getTextProcessingProviders')->willReturn([ new ServiceRegistration('test', SuccessfulSummaryProvider::class) ]); |