<commit_before><?php

namespace spec\Crummy\Phlack\Bridge\Guzzle;

use Guzzle\Service\Client;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class PhlackClientSpec extends ObjectBehavior
{
    function it_is_initializable()
    {
        $this->shouldHaveType('Crummy\Phlack\Bridge\Guzzle\PhlackClient');
    }

    function it_is_a_guzzle_client()
    {
        $this->shouldHaveType('\Guzzle\Service\Client');
    }
}<commit_msg>Adding factory config tests to PhlackClientSpec<commit_after><?php

namespace spec\Crummy\Phlack\Bridge\Guzzle;

use Guzzle\Service\Client;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class PhlackClientSpec extends ObjectBehavior
{
    function it_is_initializable()
    {
        $this->shouldHaveType('Crummy\Phlack\Bridge\Guzzle\PhlackClient');
    }

    function it_is_a_guzzle_client()
    {
        $this->shouldHaveType('\Guzzle\Service\Client');
    }

    function its_factory_which_requires_a_config()
    {
        $this::factory([ 'username' => 'foo', 'token' => 'bar' ])->shouldReturnAnInstanceOf($this);
    }

    function its_factory_requires_a_username()
    {
        $this->shouldThrow()->during('factory', array('foo' => 'user', 'token' => 'abc<PASSWORD>'));
    }

    function its_factory_requires_a_token()
    {
        $this->shouldThrow()->during('factory', array('username' => 'bar'));
    }
}
{'fraction_non_alphanumeric': 0.13846153846153847, 'fraction_numerical': 0.0, 'mean_word_length': 3.9672727272727273, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 18, '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': '6982705', 'n_tokens_mistral': 473, 'n_tokens_neox': 450, 'n_words': 63}