<commit_before><?php
/**
 * This file is part of the phpunit-mink library.
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 *
 * @copyright <NAME> <<EMAIL>>
 * @link      https://github.com/aik099/phpunit-mink
 */

namespace tests\aik099\PHPUnit\Integration;


use aik099\PHPUnit\BrowserTestCase;

abstract class BrowserStackAwareTestCase extends BrowserTestCase
{

	/**
	 * Browser list to be used in tests.
	 *
	 * @var array
	 */
	public static $browsers = array(
		array('alias' => 'browserstack'),
	);

	/**
	 * Set session meta-info for "Sauce Labs".
	 *
	 * @return void
	 */
	protected function setUp()
	{
		if ( !getenv('BS_USERNAME') || !getenv('BS_ACCESS_KEY') ) {
			$this->markTestSkipped('BrowserStack integration is not configured');
		}

		parent::setUp();
	}

	/**
	 * Whatever or not code coverage information should be gathered.
	 *
	 * @return boolean
	 * @throws \RuntimeException When used before test is started.
	 */
	public function getCollectCodeCoverageInformation()
	{
		// FIXME: Workaround for https://github.com/minkphp/phpunit-mink/issues/35 bug.
		return false;
	}

	/**
	 * Gets browser configuration aliases.
	 *
	 * Allows to decouple actual test server connection details from test cases.
	 *
	 * @return array
	 */
	public function getBrowserAliases()
	{
		return array(
			'browserstack' => array(
				'type' => 'browserstack',
				'api_username' => getenv('BS_USERNAME'),
				'api_key' => getenv('BS_ACCESS_KEY'),

				'browserName' => 'chrome',
				'desiredCapabilities' => array('browser_version' => '38.0', 'project' => 'PHPUnit-Mink'),
				'baseUrl' => 'http://www.google.<EMAIL>',
			),<commit_msg>Use Firefox in tests, because due ChromeDriver bug switching to main window is impossible<commit_after><?php
/**
 * This file is part of the phpunit-mink library.
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 *
 * @copyright <NAME> <<EMAIL>>
 * @link      https://github.com/aik099/phpunit-mink
 */

namespace tests\aik099\PHPUnit\Integration;


use aik099\PHPUnit\BrowserTestCase;

abstract class BrowserStackAwareTestCase extends BrowserTestCase
{

	/**
	 * Browser list to be used in tests.
	 *
	 * @var array
	 */
	public static $browsers = array(
		array('alias' => 'browserstack'),
	);

	/**
	 * Set session meta-info for "Sauce Labs".
	 *
	 * @return void
	 */
	protected function setUp()
	{
		if ( !getenv('BS_USERNAME') || !getenv('BS_ACCESS_KEY') ) {
			$this->markTestSkipped('BrowserStack integration is not configured');
		}

		parent::setUp();
	}

	/**
	 * Whatever or not code coverage information should be gathered.
	 *
	 * @return boolean
	 * @throws \RuntimeException When used before test is started.
	 */
	public function getCollectCodeCoverageInformation()
	{
		// FIXME: Workaround for https://github.com/minkphp/phpunit-mink/issues/35 bug.
		return false;
	}

	/**
	 * Gets browser configuration aliases.
	 *
	 * Allows to decouple actual test server connection details from test cases.
	 *
	 * @return array
	 */
	public function getBrowserAliases()
	{
		return array(
			'browserstack' => array(
				'type' => 'browserstack',
				'api_username' => getenv('BS_USERNAME'),
				'api_key' => getenv('BS_ACCESS_KEY'),
				'browserName' => 'Firefox',
				'desiredCapabilities' => array(
					'browser_version' => '41.0',
					'os' => 'Windows',
					'os_version' => '7',
					'project' => 'PHPUnit-Mink',
				),
				'baseUrl' => 'http://www.google.com',
			),
{'fraction_non_alphanumeric': 0.13619871615964277, 'fraction_numerical': 0.008093776165224673, 'mean_word_length': 3.554002541296061, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 34, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6815286', 'n_tokens_mistral': 1257, 'n_tokens_neox': 1100, 'n_words': 308}