Exemplo n.º 1
0
 /**
  * Tests the access method.
  *
  * @return  void
  *
  * @since   3.1
  */
 public function testAccess()
 {
     $result = JHtmlBatch::access();
     // Build the container to check the <label> element
     $matcher = array('id' => 'batch-access-lbl', 'tag' => 'label', 'content' => 'JLIB_HTML_BATCH_ACCESS_LABEL');
     $this->assertTag($matcher, $result, 'Expected a <label> with id "batch-access-lbl"');
     // Build the container to check the <select> element
     $matcher = array('id' => 'batch-access', 'tag' => 'select', 'child' => array('tag' => 'option', 'content' => 'Public', 'attributes' => array('value' => '1')));
     $this->assertTag($matcher, $result, 'Expected a <select> element with id "batch-access" containing a child <option value="1">Public</option>');
 }
Exemplo n.º 2
0
 /**
  * @covers JHtmlBatch::access
  */
 public function testAccess()
 {
     $this->assertThat(JHtmlBatch::access(), $this->StringContains('<option value="1">Public</option>'));
 }