ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilCmiXapiVerbListTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
22
28class ilCmiXapiVerbListTest extends TestCase
29{
30 public function testVerbList(): void
31 {
33 $this->assertEquals(
34 'http://adlnet.gov/expapi/verbs/answered',
35 $verbList->getVerbUri('answered')
36 );
37 }
38
39 public function testVerbTranslation(): void
40 {
41 $lng = $this->getMockBuilder(ilLanguage::class)
42 ->disableOriginalConstructor()
43 ->getMock();
44
45 $lng->expects($this->exactly(2))
46 ->method('txt')
47 ->willReturnOnConsecutiveCalls(
48 '-cmix_answered',
49 'answered'
50 );
51
53 $this->assertEquals(
54 'answered',
55 $verbList->getVerbTranslation(
56 $lng,
57 'http://adlnet.gov/expapi/verbs/answered'
58 )
59 );
60 $this->assertEquals(
61 'answered',
62 $verbList->getVerbTranslation(
63 $lng,
64 'http://adlnet.gov/expapi/verbs/answered'
65 )
66 );
67 }
68}
Class ilObjSCORMValidatorTest.
global $lng
Definition: privfeed.php:31