Skip to content

Commit

Permalink
test: add disabled task type unit test
Browse files Browse the repository at this point in the history
Signed-off-by: Jana Peper <[email protected]>
  • Loading branch information
janepie committed Dec 11, 2024
1 parent d52ab31 commit 6e940f0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/lib/TaskProcessing/TaskProcessingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,8 @@ protected function setUp(): void {
$taskProcessingTypeSettings = [];
$taskProcessingTypeSettings[TextToText::ID] = false;

fwrite(STDERR, print_r($taskProcessingTypeSettings, TRUE));
fwrite(STDERR, print_r('1', true));
fwrite(STDERR, print_r($taskProcessingTypeSettings, true));

$disabledConfig = $this->createMock(IConfig::class);
$disabledConfig
Expand Down Expand Up @@ -527,7 +528,8 @@ public function testProviderShouldBeRegisteredAndTaskTypeDisabled(): void {
new ServiceRegistration('test', SuccessfulSyncProvider::class)
]);
$output = $this->disabledTypeManager->getAvailableTaskTypes(true);
fwrite(STDERR, print_r($output, TRUE));
fwrite(STDERR, print_r('2', true));
fwrite(STDERR, print_r($output, true));
self::assertCount(0, $this->disabledTypeManager->getAvailableTaskTypes());
self::assertCount(1, $this->disabledTypeManager->getAvailableTaskTypes(true));
// self::assertFalse($this->disabledTypeManager->hasProviders());
Expand All @@ -541,7 +543,8 @@ public function testProviderShouldBeRegisteredAndTaskTypeDisabled2(): void {
new ServiceRegistration('test', SuccessfulSyncProvider::class)
]);
$output = $this->disabledTypeManager->getAvailableTaskTypes(true);
fwrite(STDERR, print_r($output, TRUE));
fwrite(STDERR, print_r('3', true));
fwrite(STDERR, print_r($output, true));
self::assertCount(0, $this->manager->getAvailableTaskTypes());
self::assertCount(1, $this->manager->getAvailableTaskTypes(true));
self::assertFalse($this->manager->hasProviders());
Expand Down

0 comments on commit 6e940f0

Please sign in to comment.