<commit_before><?php

namespace Bauhaus\Http;

class ResponseTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function createReponseWithStatusCode200IfItWasNotInformed()
    {
        $response = new Response();

        $this->assertEquals(200, $response->getStatusCode());
    }

    /**
     * @test
     */
    public function createNewResponseWithTheDesiredStatusCode()
    {
        $response = new Response();

        $newResponse = $response->withStatus(202);

        $this->assertNotSame($response, $newResponse);
        $this->assertEquals(202, $newResponse->getStatusCode());
    }
}
<commit_msg>Cover with tests all behaviors of Response<commit_after><?php

namespace Bauhaus\Http;

class ResponseTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function responseIsCreatedWithTheStatusCode200ByDefault()
    {
        $response = new Response();

        $this->assertEquals(200, $response->getStatusCode());
        $this->assertEquals('OK', $response->getReasonPhrase());
    }

    /**
     * @test
     */
    public function createNewResponseGivenAStatusCodeAndExpectingTheRecommendedReasonPhrase()
    {
        $response = new Response();

        $newResponse = $response->withStatus(202);

        $this->assertNotSame($response, $newResponse);
        $this->assertEquals(202, $newResponse->getStatusCode());
        $this->assertEquals('Accepted', $newResponse->getReasonPhrase());
    }

    /**
     * @test
     */
    public function createNewResponseGivenAStatusCodeAndAReasonPhrase()
    {
        $response = new Response();

        $newResponse = $response->withStatus(202, 'Processing request');

        $this->assertNotSame($response, $newResponse);
        $this->assertEquals(202, $newResponse->getStatusCode());
        $this->assertEquals('Processing request', $newResponse->getReasonPhrase());
    }
}

{'fraction_non_alphanumeric': 0.1338212232096184, 'fraction_numerical': 0.015682174594877155, 'mean_word_length': 3.1881838074398248, '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': '4525244', 'n_tokens_mistral': 548, 'n_tokens_neox': 520, 'n_words': 86}