Use real, not mocked, MDTlLoader in MDPlausiTest
This commit is contained in:
parent
85597deefe
commit
641783f8a6
|
@ -8,6 +8,12 @@ declare(strict_types = 1);
|
|||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
define('TL_FILE_DIRS', [
|
||||
__DIR__ . '/../../../l10n/musdb/',
|
||||
__DIR__ . '/../../../l10n/quality-web/',
|
||||
__DIR__ . '/../../importer/dependencies/MDAllowedValueSets/l18n/',
|
||||
]);
|
||||
|
||||
require_once __DIR__ . '/../src/Checks/Plausi/MDPlausi.php';
|
||||
require_once __DIR__ . '/../src/Checks/Plausi/MDEventCategory.php';
|
||||
require_once __DIR__ . '/../src/Checks/Plausi/MDPlausiEventCategory.php';
|
||||
|
@ -16,12 +22,7 @@ require_once __DIR__ . '/../src/Checks/Plausi/MDPlausiEvent.php';
|
|||
require_once __DIR__ . '/../../importer/dependencies/MDAllowedValueSets/src/MDRequirementsSet.php';
|
||||
require_once __DIR__ . '/../../importer/dependencies/MDAllowedValueSets/src/MDValueSet.php';
|
||||
require_once __DIR__ . '/../../importer/dependencies/MDAllowedValueSets/src/MDEventsSet.php';
|
||||
|
||||
/** For mocking */
|
||||
class MDTlLoader {
|
||||
public function tl() {
|
||||
}
|
||||
}
|
||||
require_once __DIR__ . '/../../importer/dependencies/MDTlLoader/src/MDTlLoader.php';
|
||||
|
||||
/**
|
||||
* Tests for plausi.
|
||||
|
@ -34,8 +35,7 @@ final class MDPlausiTest extends TestCase {
|
|||
*/
|
||||
public function testActorProducingObjectAfterOwnDeathResultsInWarning():void {
|
||||
|
||||
$tlLoader = $this->createMock(MDTlLoader::class);
|
||||
$tlLoader->method('tl')->willReturn('foo');
|
||||
$tlLoader = new MDTlLoader("plausi_test", "en");
|
||||
|
||||
$plausiEvent = new MDPlausiEvent(1,
|
||||
"1912",
|
||||
|
|
Loading…
Reference in New Issue
Block a user