mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-04 10:14:13 +08:00
Add tests for Case Days Open
This commit is contained in:
parent
c44c3ae8e5
commit
aeff40fec1
2 changed files with 274 additions and 0 deletions
53
tests/_mock/Mock/core/legacy/Statistics/CaseDaysOpenMock.php
Normal file
53
tests/_mock/Mock/core/legacy/Statistics/CaseDaysOpenMock.php
Normal file
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
|
||||
namespace Mock\Core\Legacy\Statistics;
|
||||
|
||||
use App\Legacy\Statistics\CaseDaysOpen;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use aCase;
|
||||
use Mock\Helpers\Core\Legacy\Data\DBQueryResultsMocking;
|
||||
use SugarBean;
|
||||
|
||||
class CaseDaysOpenMock extends CaseDaysOpen
|
||||
{
|
||||
use DBQueryResultsMocking;
|
||||
|
||||
/**
|
||||
* @var aCase
|
||||
*/
|
||||
public $case;
|
||||
|
||||
/**
|
||||
* @param aCase $case
|
||||
*/
|
||||
public function setCase(aCase $case): void
|
||||
{
|
||||
$this->case = $case;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @return aCase
|
||||
*/
|
||||
protected function getCase(string $id): aCase
|
||||
{
|
||||
return $this->case;
|
||||
}
|
||||
|
||||
protected function startLegacyApp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
protected function runAuditInfoQuery(
|
||||
EntityManagerInterface $em,
|
||||
SugarBean $bean,
|
||||
string $field,
|
||||
array $procedureParams,
|
||||
$innerQuery
|
||||
): ?array {
|
||||
return $this->getAllMockQueryResults();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue