-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
412ab5c
commit 920d2fd
Showing
6 changed files
with
113 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace MyParcelNL\Pdk\Tests\Bootstrap; | ||
|
||
use MyParcelNL\Pdk\App\Webhook\Contract\HookInterface; | ||
use MyParcelNL\Pdk\App\Webhook\PdkWebhookManager; | ||
use Symfony\Component\HttpFoundation\Request; | ||
use Symfony\Contracts\Service\ResetInterface; | ||
|
||
final class MockPdkWebhookManager extends PdkWebhookManager implements ResetInterface | ||
{ | ||
protected $calledHooks = []; | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getCalledHooks(): array | ||
{ | ||
return $this->calledHooks; | ||
} | ||
|
||
public function reset(): void | ||
{ | ||
$this->calledHooks = []; | ||
} | ||
|
||
protected function handleHook(HookInterface $hook, Request $request, array $logContext): void | ||
{ | ||
$this->calledHooks[] = $hook; | ||
|
||
parent::handleHook($hook, $request, $logContext); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters