ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
assAnswerMatchingTermTest.php
Go to the documentation of this file.
1<?php
2
27{
28 protected $backupGlobals = false;
29
30 protected function setUp(): void
31 {
32 chdir(__DIR__ . '/../../../../');
33 }
34
35 public function test_instantiateObjectSimple(): void
36 {
37 $instance = new assAnswerMatchingTerm();
38
39 $this->assertInstanceOf(assAnswerMatchingTerm::class, $instance);
40 }
41
42 public function test_setGetText(): void
43 {
44 $instance = new assAnswerMatchingTerm();
45 $expected = 'Text';
46
47 $instance = $instance->withText($expected);
48 $actual = $instance->getText();
49
50 $this->assertEquals($expected, $actual);
51 }
52
53 public function test_setGetPicture(): void
54 {
55 $instance = new assAnswerMatchingTerm();
56 $expected = 'path/to/picture?';
57
58 $instance = $instance->withPicture($expected);
59 $actual = $instance->getPicture();
60
61 $this->assertEquals($expected, $actual);
62 }
63
64 public function test_getUnsetPicture(): void
65 {
66 $instance = new assAnswerMatchingTerm();
67 $expected = null;
68
69 $actual = $instance->getPicture();
70
71 $this->assertEquals($expected, $actual);
72 }
73
74 public function test_setGetIdentifier(): void
75 {
76 $instance = new assAnswerMatchingTerm();
77 $expected = 12345;
78
79 $instance = $instance->withIdentifier($expected);
80 $actual = $instance->getIdentifier();
81
82 $this->assertEquals($expected, $actual);
83 }
84}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class for matching question terms.
Class assBaseTestCase.