/**
	 * Test the getInput method.
	 *
	 * @return  void
	 *
	 * @since   12.1
	 */
	public function testGetInput()
	{
		$form = new JFormInspector('form1');

		$this->assertThat(
			$form->load('<form><field name="sql" type="sql" key_field="id" query="SELECT * FROM `jos_categories`"><option value="*">None</option></field></form>'),
			$this->isTrue(),
			'Line:' . __LINE__ . ' XML string should load successfully.'
		);

		$field = new JFormFieldSQL($form);

		$this->assertThat(
			$field->setup($form->getXml()->field, 'value'),
			$this->isTrue(),
			'Line:' . __LINE__ . ' The setup method should return true.'
		);

		if (!is_null(self::$driver))
		{
			$this->assertThat(
				strlen($field->input),
				$this->greaterThan(0),
				'Line:' . __LINE__ . ' The getInput method should return something without error.'
			);
		}
		else
		{
			$this->markTestSkipped();
		}
	}
 /**
  * Tests folder attribute setup by JFormFieldPlugins::setup method
  *
  * @covers JFormField::setup
  * @covers JFormField::__get
  *
  * @return void
  */
 public function testSetup()
 {
     $field = new JFormFieldSQL();
     $element = simplexml_load_string('<field name="sql" type="sql" value_field="title" key_field="id" query="SELECT * FROM `jos_categories`">' . '<option value="*">None</option></field>');
     $this->assertThat($field->setup($element, ''), $this->isTrue(), 'Line:' . __LINE__ . ' The setup method should return true if successful.');
     $this->assertThat($field->keyField, $this->equalTo("id"), 'Line:' . __LINE__ . ' The property should be computed from the XML.');
     $this->assertThat($field->valueField, $this->equalTo("title"), 'Line:' . __LINE__ . ' The property should be computed from the XML.');
     $this->assertThat($field->translate, $this->isFalse(), 'Line:' . __LINE__ . ' The property should be computed from the XML.');
     $this->assertThat($field->query, $this->equalTo("SELECT * FROM `jos_categories`"), 'Line:' . __LINE__ . ' The property should be computed from the XML.');
 }