/** * Tests the JHtmlList::positions method. * * @return void * * @since 3.1 */ public function testPositions() { $result = JHtmlList::positions('position-list', 'center', null, '1', '1', '1', '1', 'positions'); // Build the container to check the <select> element $matcher = array('id' => 'positions', 'tag' => 'select', 'child' => array('tag' => 'option', 'content' => 'Left', 'attributes' => array('value' => 'left'))); $this->assertTag($matcher, $result, 'Expected a <select> element with id "user-list" containing a child <option value="left">Left</option>'); }
/** * Tests the JHtmlList::positions method. * * @return void * * @since 11.3 */ public function testPositions() { //TODO: Replace JGLOBAL_LEFT with translated string $this->assertThat(JHtmlList::positions('position-list', 'center', null, '1', '1', '1', '1', 'positions'), $this->StringContains('<option value="left">JGLOBAL_LEFT</option>')); }