4 require_once
'libs/composer/vendor/autoload.php';
17 protected function setUp() : void
21 $lng = $this->getMockBuilder(\ilLanguage::class)
22 ->disableOriginalConstructor()
25 ->will($this->returnArgument(0));
48 $isCorrect = $result->
isCorrect($variables, $results, $userResult, $userResultUnit);
49 $this->assertEquals($expectedResult, $isCorrect);
61 $meter->initFormArray([
68 'baseunit_title' =>
'' 72 $centimeter->initFormArray([
76 'unit' =>
'Centimeter',
79 'baseunit_title' =>
'Meter' 83 $newtonmetre->initFormArray([
87 'unit' =>
'Newton Metre',
90 'baseunit_title' =>
'' 94 $newtoncentimeter->initFormArray([
98 'unit' =>
'Newton Centimeter',
101 'baseunit_title' =>
'Newton Metre' 107 $v1->setIntprecision(1);
109 $v2->setIntprecision(1);
114 $v3->setVariable(
'$v3');
116 $v4->setVariable(
'$v4');
254 $v9->setVariable(
'$v9');
256 $v10->setVariable(
'$v10');
259 $v11->setVariable(
'$v11');
261 $v12->setVariable(
'$v12');
319 $v15->setIntprecision(25);
320 $v16->setIntprecision(5);
321 $v17->setIntprecision(1);
331 '1/(2*pi)*sqrt($v16*1000/$v15)+$v17-$v17',
342 $v1->getVariable() => $v1,
343 $v2->getVariable() => $v2,
344 $v3->getVariable() => $v3,
345 $v4->getVariable() => $v4,
346 $v5->getVariable() => $v5,
347 $v6->getVariable() => $v6,
348 $v7->getVariable() => $v7,
349 $v8->getVariable() => $v8,
350 $v9->getVariable() => $v9,
351 $v10->getVariable() => $v10,
352 $v11->getVariable() => $v11,
353 $v12->getVariable() => $v12,
354 $v13->getVariable() => $v13,
355 $v14->getVariable() => $v14,
356 $v15->getVariable() => $v15,
357 $v16->getVariable() => $v16,
358 $v17->getVariable() => $v17,
362 $r1->getResult() => $r1,
363 $r2->getResult() => $r2,
364 $r3->getResult() => $r3,
365 $r4->getResult() => $r4,
366 $r5->getResult() => $r5,
367 $r6->getResult() => $r6,
368 $r7->getResult() => $r7,
369 $r8->getResult() => $r8,
370 $r9->getResult() => $r9,
371 $r10->getResult() => $r10,
372 $r11->getResult() => $r11,
373 $r12->getResult() => $r12,
378 [$r1, $variables,
$results,
'129.36', $newtoncentimeter,
true],
379 [$r2, $variables,
$results,
'1.29', $newtonmetre,
true],
380 [$r3, $variables,
$results,
'1.29', $newtonmetre,
true],
381 [$r4, $variables,
$results,
'129.36', $newtoncentimeter,
true],
382 [$r5, $variables,
$results,
'1.29', null,
true],
383 [$r6, $variables,
$results,
'129.36', null,
true],
385 [$r7, $variables,
$results,
'1/3', null,
true],
386 [$r8, $variables,
$results,
'4/8', null,
true],
388 [$r9, $variables,
$results,
'1/2', null,
true],
389 [$r10, $variables,
$results,
'4/8', null,
false],
391 [$r11, $variables,
$results,
'1/3', null,
true],
393 [$r12, $variables,
$results,
'3.1', null,
true],
setGlobalVariable($name, $value)