コード例 #1
0
ファイル: JHtmlListTest.php プロジェクト: SysBind/joomla-cms
 /**
  * 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>');
 }
コード例 #2
0
 /**
  * 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>'));
 }