示例#1
0
 /**
  * @covers JHtmlBatch::item
  */
 public function testItem()
 {
     $this->assertThat(JHtmlBatch::item('com_content'), $this->StringContains('<option value="2">Uncategorised</option>'));
 }
示例#2
0
 /**
  * Tests the item method.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testItem()
 {
     $result = JHtmlBatch::item('com_content');
     // Build the container to check the <label> element
     $matcher = array('id' => 'batch-choose-action-lbl', 'tag' => 'label', 'content' => 'JLIB_HTML_BATCH_MENU_LABEL');
     $this->assertTag($matcher, $result, 'Expected a <label> with id "batch-choose-action-lbl"');
     // Build the container to check the <div> element
     $matcher = array('id' => 'batch-choose-action', 'tag' => 'div', 'child' => array('id' => 'batch-category-id', 'tag' => 'select', 'child' => array('tag' => 'option', 'content' => '- - - Modules', 'attributes' => array('value' => '22'))));
     $this->assertTag($matcher, $result, 'Expected <div id="batch-choose-action"> containing child <select id="batch-category-id"> with <option value="22">- - - Modules</option>');
 }