<commit_before><?php

namespace Guzzle\Tests\Http\Plugin;

use Guzzle\Http\Plugin\CurlAuthPlugin;
use Guzzle\Http\Client;

/**
 * @covers Guzzle\Http\Plugin\CurlAuthPlugin
 */
class CurlAuthPluginTest extends \Guzzle\Tests\GuzzleTestCase
{
	public function testAddsBasicAuthentication()
	{
		$plugin = new CurlAuthPlugin('michael', 'test');
		$client = new Client('http://www.test.com/');
		$client->getEventDispatcher()->addSubscriber($plugin);
		$request = $client->get('/');
		$this->assertEquals('michael', $request->getUsername());
		$this->assertEquals('test', $request->getPassword());
	}
	
    public function testAddsDigestAuthentication()
    {
        $plugin = new CurlAuthPlugin('julian', 'test', CURLAUTH_DIGEST);
        $client = new Client('http://www.test.com/');
        $client->getEventDispatcher()->addSubscriber($plugin);
        $request = $client->get('/');
        $this->assertEquals('julian', $request->getUsername());
        $this->assertEquals('test', $request->getPassword());
        $this->assertEquals('julian:test', $request->getCurlOptions()->get(CURLOPT_USERPWD));
        $this->assertEquals(CURLAUTH_DIGEST, $request->getCurlOptions()->get(CURLOPT_HTTPAUTH));
    }
}<commit_msg>Fixed up some indents - spaces instead of tabs.<commit_after><?php

namespace Guzzle\Tests\Http\Plugin;

use Guzzle\Http\Plugin\CurlAuthPlugin;
use Guzzle\Http\Client;

/**
 * @covers Guzzle\Http\Plugin\CurlAuthPlugin
 */
class CurlAuthPluginTest extends \Guzzle\Tests\GuzzleTestCase
{
    public function testAddsBasicAuthentication()
    {
        $plugin = new CurlAuthPlugin('michael', 'test');
        $client = new Client('http://www.test.com/');
        $client->getEventDispatcher()->addSubscriber($plugin);
        $request = $client->get('/');
        $this->assertEquals('michael', $request->getUsername());
        $this->assertEquals('test', $request->getPassword());
    }

    public function testAddsDigestAuthentication()
    {
        $plugin = new CurlAuthPlugin('julian', 'test', CURLAUTH_DIGEST);
        $client = new Client('http://www.test.com/');
        $client->getEventDispatcher()->addSubscriber($plugin);
        $request = $client->get('/');
        $this->assertEquals('julian', $request->getUsername());
        $this->assertEquals('test', $request->getPassword());
        $this->assertEquals('julian:test', $request->getCurlOptions()->get(CURLOPT_USERPWD));
        $this->assertEquals(CURLAUTH_DIGEST, $request->getCurlOptions()->get(CURLOPT_HTTPAUTH));
    }
}
{'fraction_non_alphanumeric': 0.17647058823529413, 'fraction_numerical': 0.0, 'mean_word_length': 4.254697286012526, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '2555615', 'n_tokens_mistral': 782, 'n_tokens_neox': 760, 'n_words': 111}