ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
assAnswerOrderingTest.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 
37  {
38  // Act
39  $instance = new ilAssOrderingElement();
40 
41  $this->assertInstanceOf('ilAssOrderingElement', $instance);
42  }
43 
44  public function test_setGetRandomId(): void
45  {
46  $instance = new ilAssOrderingElement();
47  $expected = 13579;
48 
49  // Act
50  $instance->setRandomIdentifier($expected);
51  $actual = $instance->getRandomIdentifier();
52 
53  // Assert
54  $this->assertEquals($expected, $actual);
55  }
56 
57  public function test_setGetAnswerId(): void
58  {
59  $instance = new ilAssOrderingElement();
60  $expected = 13579;
61 
62  // Act
63  $instance->setId($expected);
64  $actual = $instance->getId();
65 
66  // Assert
67  $this->assertEquals($expected, $actual);
68  }
69 
70 
71  public function test_setGetOrdeingDepth(): void
72  {
73  $instance = new ilAssOrderingElement();
74  $expected = 13579;
75 
76  // Act
77  $instance->setIndentation($expected);
78  $actual = $instance->getIndentation();
79 
80  // Assert
81  $this->assertEquals($expected, $actual);
82  }
83 }
Class assBaseTestCase.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...