ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilCmiXapiVerbListTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
29 {
30  public function testVerbList(): void
31  {
32  $verbList = ilCmiXapiVerbList::getInstance();
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 
52  $verbList = ilCmiXapiVerbList::getInstance();
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