16 lines
594 B
PHP
16 lines
594 B
PHP
|
<?php declare(strict_types=1);
|
||
|
use PHPUnit\Framework\TestCase;
|
||
|
include '../../../modules/opencase_cases/src/Entity/OCCase.php';
|
||
|
|
||
|
final class HookHelperTest extends TestCase
|
||
|
{
|
||
|
public function testOnCaseFeeUpdate(): void
|
||
|
{
|
||
|
$caseStub = $this->createStub(\Drupal\opencase_cases\Entity\OCCase::class);
|
||
|
$caseStub->total_fee = 5;
|
||
|
$caseFeeStub = $this->createStub(\Drupal\opencase_cases\Entity\OCCaseFee::class);
|
||
|
$caseFeeStub->amount = 10;
|
||
|
$caseFeeStub->method('getCase')->will($this->returnValue($caseStub));
|
||
|
$this->assertSame(5,5);
|
||
|
}
|
||
|
}
|