<commit_before><?php

namespace Lily\Test\Util;

use Lily\Util\Response;

class ResponseTest extends \PHPUnit_Framework_TestCase
{
    public function responseProvider()
    {
        return array(
            array(200, array('Content-Type' => 'text/plain'), 'Test')
        );
    }

    /**
     * @dataProvider responseProvider
     */
    public function testResponse($status, $headers, $body)
    {
        $this->assertSame(
            compact('status', 'headers', 'body'),
            Response::response($status, $headers, $body));
    }

    /**
     * @dataProvider responseProvider
     */
    public function testOKResponse($status, $headers, $body)
    {
        $status = 200;

        $this->assertSame(
            compact('status', 'headers', 'body'),
            Response::ok($headers, $body));
    }

    /**
     * @dataProvider responseProvider<commit_msg>Add another set of test data for Response tests<commit_after><?php

namespace Lily\Test\Util;

use Lily\Util\Response;

class ResponseTest extends \PHPUnit_Framework_TestCase
{
    public function responseProvider()
    {
        return array(
            array(200, array('Content-Type' => 'text/plain'), 'OK'),
            array(500, array('Content-Type' => 'text/html'), 'Error'),
        );
    }

    /**
     * @dataProvider responseProvider
     */
    public function testResponse($status, $headers, $body)
    {
        $this->assertSame(
            compact('status', 'headers', 'body'),
            Response::response($status, $headers, $body));
    }

    /**
     * @dataProvider responseProvider
     */
    public function testOKResponse($status, $headers, $body)
    {
        $status = 200;

        $this->assertSame(
            compact('status', 'headers', 'body'),
            Response::ok($headers, $body));
    }

    /**
     * @dataProvider responseProvider
{'fraction_non_alphanumeric': 0.14516129032258066, 'fraction_numerical': 0.008064516129032258, 'mean_word_length': 2.395985401459854, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '2625872', 'n_tokens_mistral': 526, 'n_tokens_neox': 507, 'n_words': 109}