Пример #1
0
 /**
  * Tests the user method.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testUser()
 {
     $result = JHtmlBatch::user(true);
     // Build the container to check the <label> element
     $matcher = array('id' => 'batch-user-lbl', 'tag' => 'label', 'content' => 'JLIB_HTML_BATCH_USER_LABEL');
     $this->assertTag($matcher, $result, 'Expected a <label> with id "batch-user-lbl"');
     // Build the container to check the <select> element
     $matcher = array('id' => 'batch-user-id', 'tag' => 'select', 'child' => array('tag' => 'option', 'content' => 'Super User', 'attributes' => array('value' => '42')));
     $this->assertTag($matcher, $result, 'Expected a <select> element with id "batch-user-id" containing a child <option value="42">Super User</option>');
 }
Пример #2
0
 /**
  * @covers JHtmlBatch::user
  */
 public function testUser()
 {
     $this->assertThat(JHtmlBatch::user(true), $this->StringContains('<option value="42">Super User</option>'));
 }
 /**
  * Tests the JHtmlBatch::item method.
  *
  * @param	string	$extension
  */
 public function testItem()
 {
     $this->assertThat(JHtmlBatch::item('com_content'), $this->StringContains('<option value="2">Uncategorised</option>'));
 }