ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilStudyProgrammeProgressIdTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
21 require_once(__DIR__ . "/../../../../../libs/composer/vendor/autoload.php");
22 
24 
25 class ilStudyProgrammeProgressIdTest extends \PHPUnit\Framework\TestCase
26 {
27  protected $backupGlobals = false;
28 
29  public function testPRGProgressId(): void
30  {
31  $ass_id = 12;
32  $usr_id = 34;
33  $node_id = 56;
34  $id = new PRGProgressId($ass_id, $usr_id, $node_id);
35 
36  $this->assertEquals($id->getAssignmentId(), $ass_id);
37  $this->assertEquals($id->getUsrId(), $usr_id);
38  $this->assertEquals($id->getNodeId(), $node_id);
39  $this->assertEquals((string) $id, '12_34_56');
40  }
41 
42  public function testPRGProgressIdFromString(): void
43  {
44  $src = '12_34_56';
46  $this->assertInstanceOf(PRGProgressId::class, $id);
47  $this->assertEquals((string) $id, $src);
48  }
49 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static createFromString(string $id)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23