<commit_before><?php

namespace spec\Mdb\PayPal\Ipn\MessageFactory;

use Mdb\PayPal\Ipn\InputStream;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class InputStreamMessageFactorySpec extends ObjectBehavior
{
    function let(InputStream $inputStream)
    {
        $this->beConstructedWith($inputStream);
    }

    function it_should_be_a_message_factory()
    {
        $this->shouldHaveType('Mdb\PayPal\Ipn\MessageFactory');
    }

    function it_should_create_a_message_from_the_input_stream(InputStream $inputStream)
    {
        $streamContents = 'foo=bar&baz=quz';

        $inputStream->getContents()->willReturn($streamContents);

        $this->createMessage()->shouldHaveType('Mdb\PayPal\Ipn\Message');
    }

    function it_should_url_decode_values_from_the_input_stream(InputStream $inputStream)
    {
        $streamContents = 'foo=bar&baz=quz+foo+%28bar%29';

        $inputStream->getContents()->willReturn($streamContents);

        $message = $this->createMessage();

        $message->__toString()->shouldReturn($streamContents);
    }
}<commit_msg>Update InputStreamMessageFactorySpec.php<commit_after><?php

namespace spec\Mdb\PayPal\Ipn\MessageFactory;

use Mdb\PayPal\Ipn\InputStream;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;

class InputStreamMessageFactorySpec extends ObjectBehavior
{
    function let(InputStream $inputStream)
    {
        $this->beConstructedWith($inputStream);
    }

    function it_should_be_a_message_factory()
    {
        $this->shouldHaveType('Mdb\PayPal\Ipn\MessageFactory');
    }

    function it_should_create_a_message_from_the_input_stream(InputStream $inputStream)
    {
        $streamContents = 'foo=bar&baz=quz';

        $inputStream->getContents()->willReturn($streamContents);

        $this->createMessage()->shouldHaveType('Mdb\PayPal\Ipn\Message');
    }

    function it_should_url_decode_values_from_the_input_stream(InputStream $inputStream)
    {
        $streamContents = 'foo=bar&baz=quz%2Bfoo%2B%28bar%29';

        $inputStream->getContents()->willReturn($streamContents);

        $message = $this->createMessage();

        $message->__toString()->shouldReturn($streamContents);
    }
}
{'fraction_non_alphanumeric': 0.12219679633867277, 'fraction_numerical': 0.004576659038901602, 'mean_word_length': 4.292978208232445, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, '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': '2976362', 'n_tokens_mistral': 686, 'n_tokens_neox': 662, 'n_words': 73}