Fix phpmailer (Case sensitive Check)
This commit is contained in:
parent
b1a402a787
commit
e2b736d0a9
5 changed files with 196 additions and 3 deletions
30
tests/Util/HookMockTrait.php
Normal file
30
tests/Util/HookMockTrait.php
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Test\Util;
|
||||
|
||||
use Friendica\Core\Hook;
|
||||
use Mockery\MockInterface;
|
||||
|
||||
trait HookMockTrait
|
||||
{
|
||||
|
||||
/**
|
||||
* @var MockInterface The Interface for mocking a renderer
|
||||
*/
|
||||
private $hookMock;
|
||||
|
||||
/**
|
||||
* Mocking a method 'Hook::call()' call
|
||||
*
|
||||
*/
|
||||
public function mockHookCallAll(string $name, &$capture)
|
||||
{
|
||||
if (!isset($this->hookMock)) {
|
||||
$this->hookMock = \Mockery::mock('alias:' . Hook::class);
|
||||
}
|
||||
|
||||
$this->hookMock
|
||||
->shouldReceive('callAll')
|
||||
->withArgs([$name, \Mockery::capture($capture)]);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue