ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
RatingCategoryTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use PHPUnit\Framework\TestCase;
22
28class RatingCategoryTest extends TestCase
29{
30 protected function tearDown(): void
31 {
32 }
33
37 public function testRatingCategoryProperties(): void
38 {
39 $database = $this->getMockBuilder(ilDBInterface::class)->getMock();
40
41 $rating_category = new ilRatingCategory(
42 null,
43 $database
44 );
45
46 $rating_category->setTitle("title");
47 $rating_category->setDescription("description");
48 $rating_category->setId(1);
49 $rating_category->setParentId(2);
50 $rating_category->setPosition(10);
51
52 $this->assertEquals(
53 "title",
54 $rating_category->getTitle()
55 );
56
57 $this->assertEquals(
58 "description",
59 $rating_category->getDescription()
60 );
61
62 $this->assertEquals(
63 1,
64 $rating_category->getId()
65 );
66
67 $this->assertEquals(
68 2,
69 $rating_category->getParentId()
70 );
71
72 $this->assertEquals(
73 10,
74 $rating_category->getPosition()
75 );
76 }
77}
Test peer reviews.
testRatingCategoryProperties()
Test if each rater has $num_assignments peers.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...