Skip to content

Commit

Permalink
Fixed return handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Raistlfiren committed Jul 16, 2024
1 parent 3481987 commit 56b3c28
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/Library/Handler/HandlerFactoryTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php


namespace App\Tests\Library\Handler;


use App\Library\Handler\HandlerFactory;
use App\Library\Handler\HandlerOptions;
use App\Library\Handler\ImportHandler;
Expand All @@ -16,7 +14,7 @@ class HandlerFactoryTest extends KernelTestCase
protected $importHandler;
protected $scheduleHandler;

protected function setUp() : void
protected function setUp(): void
{
$this->importHandler = $this->getMockBuilder(ImportHandler::class)
->disableOriginalConstructor()
Expand All @@ -41,8 +39,7 @@ public function testImportBuildCommand()
$handlerOptions->setDeleteOnly(false);

$this->importHandler->expects($this->once())
->method('handle')
->willReturn($this->importHandler);
->method('handle');

$test = $this->handlerFactory->buildCommand($handlerOptions);

Expand All @@ -59,11 +56,10 @@ public function testScheduleBuildCommand()
$handlerOptions->setDeleteOnly(false);

$this->scheduleHandler->expects($this->once())
->method('handle')
->willReturn($this->scheduleHandler);
->method('handle');

$test = $this->handlerFactory->buildCommand($handlerOptions);

self::assertInstanceOf(ScheduleHandler::class, $test);
}
}
}

0 comments on commit 56b3c28

Please sign in to comment.