ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
PropertyListingTest Class Reference
+ Inheritance diagram for PropertyListingTest:
+ Collaboration diagram for PropertyListingTest:

Public Member Functions

 testPropertyListingConstruction ()
 
 testPropertyListingWithProperty ()
 
 testPropertyListingWithItems ()
 
 testPropertyListingRendering ()
 

Protected Member Functions

 getListingFactory ()
 

Detailed Description

Definition at line 24 of file PropertyListingTest.php.

Member Function Documentation

◆ getListingFactory()

PropertyListingTest::getListingFactory ( )
protected

Definition at line 26 of file PropertyListingTest.php.

Referenced by testPropertyListingConstruction(), testPropertyListingRendering(), testPropertyListingWithItems(), and testPropertyListingWithProperty().

26  : Listing\Factory
27  {
28  return new Listing\Factory();
29  }
+ Here is the caller graph for this function:

◆ testPropertyListingConstruction()

PropertyListingTest::testPropertyListingConstruction ( )

Definition at line 31 of file PropertyListingTest.php.

References getListingFactory().

31  : void
32  {
33  $pl = $this->getListingFactory()->property();
34  $this->assertInstanceOf(I\Listing\Listing::class, $pl);
35  $this->assertInstanceOf(I\Listing\Property::class, $pl);
36  }
+ Here is the call graph for this function:

◆ testPropertyListingRendering()

PropertyListingTest::testPropertyListingRendering ( )

Definition at line 64 of file PropertyListingTest.php.

References getListingFactory().

64  : void
65  {
66  $props = [
67  ['label1', 'value1', true],
68  ['label2', 'value2', false]
69  ];
70  $pl = $this->getListingFactory()->property()
71  ->withItems($props);
72 
73  $expected = $this->brutallyTrimHTML('
74 <div class="l-bar__space-keeper c-listing-property">
75  <div class="l-bar__group c-listing-property__property">
76  <span class="l-bar__element c-listing-property__propertylabel">label1</span>
77  <span class="l-bar__element c-listing-property__propertyvalue">value1</span>
78  </div>
79  <div class="l-bar__group c-listing-property__property">
80  <span class="l-bar__element c-listing-property__propertyvalue">value2</span>
81  </div>
82 </div>
83  ');
84 
85  $this->assertEquals(
86  $expected,
87  $this->brutallyTrimHTML($this->getDefaultRenderer()->render($pl))
88  );
89  }
+ Here is the call graph for this function:

◆ testPropertyListingWithItems()

PropertyListingTest::testPropertyListingWithItems ( )

Definition at line 51 of file PropertyListingTest.php.

References getListingFactory().

51  : void
52  {
53  $props = [
54  ['label1', 'value1', true],
55  ['label2', 'value2', false]
56  ];
57  $pl = $this->getListingFactory()->property()
58  ->withProperty('overwritten', 'by props');
59 
60  $pl = $pl->withItems($props);
61  $this->assertEquals($props, $pl->getItems());
62  }
+ Here is the call graph for this function:

◆ testPropertyListingWithProperty()

PropertyListingTest::testPropertyListingWithProperty ( )

Definition at line 38 of file PropertyListingTest.php.

References getListingFactory().

38  : void
39  {
40  $props = [
41  ['label1', 'value1', true],
42  ['label2', 'value2', false]
43  ];
44  $pl = $this->getListingFactory()->property()
45  ->withProperty(...$props[0])
46  ->withProperty(...$props[1]);
47 
48  $this->assertEquals($props, $pl->getItems());
49  }
+ Here is the call graph for this function:

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