ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
DataLinkTest Class Reference

Tests the Link Datatype. More...

+ Inheritance diagram for DataLinkTest:
+ Collaboration diagram for DataLinkTest:

Public Member Functions

 testFactory ()
 
 testValues (Link $link)
 

Protected Member Functions

 setUp ()
 

Private Attributes

ILIAS Data Factory $f
 
string $label
 
ILIAS Data URI $url
 

Detailed Description

Tests the Link Datatype.

Definition at line 27 of file LinkTest.php.

Member Function Documentation

◆ setUp()

DataLinkTest::setUp ( )
protected

Definition at line 33 of file LinkTest.php.

33  : void
34  {
35  $this->f = new ILIAS\Data\Factory();
36  $this->label = 'ILIAS Homepage';
37  $this->url = $this->f->uri('https://www.ilias.de');
38  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ testFactory()

DataLinkTest::testFactory ( )

Definition at line 40 of file LinkTest.php.

40  : Link
41  {
42  $link = $this->f->link($this->label, $this->url);
43  $this->assertInstanceOf(Link::class, $link);
44  return $link;
45  }

◆ testValues()

DataLinkTest::testValues ( Link  $link)

Definition at line 48 of file LinkTest.php.

References ILIAS\Data\Link\getLabel().

48  : void
49  {
50  $this->assertEquals(
51  $this->label,
52  $link->getLabel()
53  );
54  $this->assertEquals(
55  $this->url,
56  $link->getUrl()
57  );
58  }
+ Here is the call graph for this function:

Field Documentation

◆ $f

ILIAS Data Factory DataLinkTest::$f
private

Definition at line 29 of file LinkTest.php.

◆ $label

string DataLinkTest::$label
private

Definition at line 30 of file LinkTest.php.

◆ $url

ILIAS Data URI DataLinkTest::$url
private

Definition at line 31 of file LinkTest.php.


The documentation for this class was generated from the following file: