<commit_before><?php namespace Cartalyst\Stripe\Tests;
/**
 * Part of the Stripe package.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under the Cartalyst PSL License.
 *
 * This source file is subject to the Cartalyst PSL License that is
 * bundled with this package in the license.txt file.
 *
 * @package    Stripe
 * @version    1.0.0
 * @author     Cartalyst LLC
 * @license    Cartalyst PSL
 * @copyright  (c) 2011-2014, Cartalyst LLC
 * @link       http://cartalyst.com
 */

use Cartalyst\Stripe\Stripe;
use PHPUnit_Framework_TestCase;

class StripeTest extends PHPUnit_Framework_TestCase {

	/**
	 * The Stripe client.
	 *
	 * @var \Cartalyst\Stripe\Stripe
	 */
	protected $stripe;

	/**
	 * Setup resources and dependencies
	 *
	 * @return void
	 */
	public function setUp()
	{
		$this->stripe = new Stripe('stripe-api-key', '2014-06-17', __DIR__.'/../manifests');
	}

	/** @test */
	public function it_can_retrieve_the_api_key()
	{
		$this->assertEquals('stripe-api-key', $this->stripe->getStripeKey());
	}

	/** @test */
	public function it_can_set_the_api_key()
	{
		$this->stripe->setStripeKey('my-stripe-key');

		$this->assertEquals('my-stripe-key', $this->stripe->getStripeKey());
	}

	/** @test */
	public function it_can_retrieve_the_api_version()
	{
		$this->assertEquals('2014-06-17', $this->stripe->getVersion());
	}

	/** @test */
	public function it_can_set_the_api_version()
	{
		$this->stripe->setVersion('2014-01-01');

		$this->assertEquals('2014-01-01', $this->stripe->getVersion());
	}

	/** @test */
	public function it_can_retrieve_the_user_agent()
	{
		$this->assertEquals('Cartalyst-Stripe/1.0.0', $this->stripe->getUserAgent());
	}

	/** @test */
	public function it_can_set_the_user_agent()
	{
		$this->stripe->setUserAgent('Foo/Bar');

		$this->assertEquals('Foo/Bar', $this->stripe->getUserAgent());
	}

	/** @test */
	public function it_can_retrieve_the_manifest_path()
	{
		$this->assertEquals(__DIR__.'/../manifests', $this->stripe->getManifestPath());
	}

	/** @test */
	public function it_can_set_the_manifest_path()
	{
		$this->stripe->setManifestPath('foo/bar/baz');

		$this->assertEquals('foo/bar/baz', $this->stripe->getManifestPath());
	}

	/** @test */
	public function it_can_retrieve_the_client_headers()
	{
		$headers = $this->stripe->getHeaders();

		$expected = [
			'Stripe-Version' => '2014-06-17',
		];

		$this->assertEquals($headers, $expected);
	}

	/** @test */
	public function it_can_set_the_client_headers()
	{
		$this->stripe->setHeaders([
			'some-header' => 'foo-bar',
		]);

		$headers = $this->stripe->getHeaders();

		$expected = [
			'some-header'     => 'foo-bar',
			'Stripe-Version' => '2014-06-17',
		];
<commit_msg>remove extra space on tests<commit_after><?php namespace Cartalyst\Stripe\Tests;
/**
 * Part of the Stripe package.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under the Cartalyst PSL License.
 *
 * This source file is subject to the Cartalyst PSL License that is
 * bundled with this package in the license.txt file.
 *
 * @package    Stripe
 * @version    1.0.0
 * @author     Cartalyst LLC
 * @license    Cartalyst PSL
 * @copyright  (c) 2011-2014, Cartalyst LLC
 * @link       http://cartalyst.com
 */

use Cartalyst\Stripe\Stripe;
use PHPUnit_Framework_TestCase;

class StripeTest extends PHPUnit_Framework_TestCase {

	/**
	 * The Stripe client.
	 *
	 * @var \Cartalyst\Stripe\Stripe
	 */
	protected $stripe;

	/**
	 * Setup resources and dependencies
	 *
	 * @return void
	 */
	public function setUp()
	{
		$this->stripe = new Stripe('stripe-api-key', '2014-06-17', __DIR__.'/../manifests');
	}

	/** @test */
	public function it_can_retrieve_the_api_key()
	{
		$this->assertEquals('stripe-api-key', $this->stripe->getStripeKey());
	}

	/** @test */
	public function it_can_set_the_api_key()
	{
		$this->stripe->setStripeKey('my-stripe-key');

		$this->assertEquals('my-stripe-key', $this->stripe->getStripeKey());
	}

	/** @test */
	public function it_can_retrieve_the_api_version()
	{
		$this->assertEquals('2014-06-17', $this->stripe->getVersion());
	}

	/** @test */
	public function it_can_set_the_api_version()
	{
		$this->stripe->setVersion('2014-01-01');

		$this->assertEquals('2014-01-01', $this->stripe->getVersion());
	}

	/** @test */
	public function it_can_retrieve_the_user_agent()
	{
		$this->assertEquals('Cartalyst-Stripe/1.0.0', $this->stripe->getUserAgent());
	}

	/** @test */
	public function it_can_set_the_user_agent()
	{
		$this->stripe->setUserAgent('Foo/Bar');

		$this->assertEquals('Foo/Bar', $this->stripe->getUserAgent());
	}

	/** @test */
	public function it_can_retrieve_the_manifest_path()
	{
		$this->assertEquals(__DIR__.'/../manifests', $this->stripe->getManifestPath());
	}

	/** @test */
	public function it_can_set_the_manifest_path()
	{
		$this->stripe->setManifestPath('foo/bar/baz');

		$this->assertEquals('foo/bar/baz', $this->stripe->getManifestPath());
	}

	/** @test */
	public function it_can_retrieve_the_client_headers()
	{
		$headers = $this->stripe->getHeaders();

		$expected = [
			'Stripe-Version' => '2014-06-17',
		];

		$this->assertEquals($headers, $expected);
	}

	/** @test */
	public function it_can_set_the_client_headers()
	{
		$this->stripe->setHeaders([
			'some-header' => 'foo-bar',
		]);

		$headers = $this->stripe->getHeaders();

		$expected = [
			'some-header'    => 'foo-bar',
			'Stripe-Version' => '2014-06-17',
		];

{'fraction_non_alphanumeric': 0.18056845625116105, 'fraction_numerical': 0.023035482073193385, 'mean_word_length': 3.8592057761732854, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 91, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '618924', 'n_tokens_mistral': 2177, 'n_tokens_neox': 1968, 'n_words': 324}