<?php
/**
 * @package     Joomla.UnitTest
 * @subpackage  com_finder
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

require_once JPATH_ADMINISTRATOR . '/components/com_finder/helpers/indexer/parser.php';

/**
 * Test class for FinderIndexerParser.
 * Generated by PHPUnit on 2012-06-10 at 14:41:55.
 */
class FinderIndexerParserTest extends PHPUnit_Framework_TestCase
{
	/**
	 * Sets up the fixture, for example, opens a network connection.
	 * This method is called before a test is executed.
	 */
	protected function setUp()
	{
	}

	/**
	 * Tears down the fixture, for example, closes a network connection.
	 * This method is called after a test is executed.
	 */
	protected function tearDown()
	{
	}

	/**
	 * Tests the getInstance method
	 *
	 * @return  void
	 *
	 * @since   3.0
	 */
	public function testGetInstance()
	{
		$this->assertThat(
			FinderIndexerParser::getInstance('html'),
			$this->isInstanceOf('FinderIndexerParserHtml'),
			'getInstance with param "html" returns an instance of FinderIndexerParserHtml.'
		);
	}

	/**
	 * Tests the getInstance method with a non-existing parser
	 *
	 * @return  void
	 *
	 * @since   3.0
	 *
	 * @expectedException  Exception
	 */
	public function testGetInstance_noParser()
	{
		FinderIndexerParser::getInstance('noway');
	}

	/**
	 * @todo   Implement testParse().
	 */
	public function testParse()
	{
		// Remove the following lines when you implement this test.
		$this->markTestIncomplete('This test has not been implemented yet.');
	}
}
