ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
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(dirname(__FILE__));
33  chdir('../../../');
34  }
35 
36  public function test_instantiateObjectSimple(): void
37  {
38  // Act
39  $instance = new assAnswerMatchingTerm();
40 
41  // Assert
42  $this->assertInstanceOf('assAnswerMatchingTerm', $instance);
43  }
44 
45  public function test_setGetText(): void
46  {
47  $instance = new assAnswerMatchingTerm();
48  $expected = 'Text';
49 
50  // Act
51  $instance = $instance->withText($expected);
52  $actual = $instance->getText();
53 
54  // Assert
55  $this->assertEquals($expected, $actual);
56  }
57 
58  public function test_setGetPicture(): void
59  {
60  $instance = new assAnswerMatchingTerm();
61  $expected = 'path/to/picture?';
62 
63  // Act
64  $instance = $instance->withPicture($expected);
65  $actual = $instance->getPicture();
66 
67  // Assert
68  $this->assertEquals($expected, $actual);
69  }
70 
71  public function test_getUnsetPicture(): void
72  {
73  $instance = new assAnswerMatchingTerm();
74  $expected = null;
75 
76  // Act
77  $actual = $instance->getPicture();
78 
79  // Assert
80  $this->assertEquals($expected, $actual);
81  }
82 
83  public function test_setGetIdentifier(): void
84  {
85  $instance = new assAnswerMatchingTerm();
86  $expected = 12345;
87 
88  // Act
89  $instance = $instance->withIdentifier($expected);
90  $actual = $instance->getIdentifier();
91 
92  // Assert
93  $this->assertEquals($expected, $actual);
94  }
95 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class assBaseTestCase.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...