<commit_before><?php

/*
 * This file is part of Slim HTTP Basic Authentication middleware
 *
 * Copyright (c) 2013-2014 <NAME>
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   https://github.com/tuupola/slim-basic-auth
 *
 */

namespace Test;

use \Slim\Middleware\HttpBasicAuthentication\RequestMethodPassthrough;

class RequestMethodPassthroughTest extends \PHPUnit_Framework_TestCase
{

    public function testShouldNotAuthenticateOptions()
    {
        \Slim\Environment::mock(array(
            "REQUEST_METHOD" => "OPTIONS"
        ));

        $rule = new RequestMethodPassthrough();

        $this->assertFalse($rule(new \Slim\Slim));
    }

    public function testShouldAuthenticatePost()
    {
        \Slim\Environment::mock(array(
            "REQUEST_METHOD" => "POST"
        ));

        $rule = new RequestMethodPassthrough();

        $this->assertTrue($rule(new \Slim\Slim));
    }

    public function testShouldAuthenticateGet()
    {
        \Slim\Environment::mock(array(
            "REQUEST_METHOD" => "GET"
        ));

        $rule = new RequestMethodPassthrough();

        $this->assertTrue($rule(new \Slim\Slim));
    }

    public function testShouldConfigurepassThrough()
    {
        \Slim\Environment::mock(array(
            "REQUEST_METHOD" => "GET"
        ));

        $rule = new RequestMethodPassthrough(array(
            "passthrough" => array("GET")
        ));

        $this->assertFalse($rule(new \Slim\Slim));
    }
}<commit_msg>Fix test name casing<commit_after><?php

/*
 * This file is part of Slim HTTP Basic Authentication middleware
 *
 * Copyright (c) 2013-2014 <NAME>
 *
 * Licensed under the MIT license:
 *   http://www.opensource.org/licenses/mit-license.php
 *
 * Project home:
 *   https://github.com/tuupola/slim-basic-auth
 *
 */

namespace Test;

use \Slim\Middleware\HttpBasicAuthentication\RequestMethodPassthrough;

class RequestMethodPassthroughTest extends \PHPUnit_Framework_TestCase
{

    public function testShouldNotAuthenticateOptions()
    {
        \Slim\Environment::mock(array(
            "REQUEST_METHOD" => "OPTIONS"
        ));

        $rule = new RequestMethodPassthrough();

        $this->assertFalse($rule(new \Slim\Slim));
    }

    public function testShouldAuthenticatePost()
    {
        \Slim\Environment::mock(array(
            "REQUEST_METHOD" => "POST"
        ));

        $rule = new RequestMethodPassthrough();

        $this->assertTrue($rule(new \Slim\Slim));
    }

    public function testShouldAuthenticateGet()
    {
        \Slim\Environment::mock(array(
            "REQUEST_METHOD" => "GET"
        ));

        $rule = new RequestMethodPassthrough();

        $this->assertTrue($rule(new \Slim\Slim));
    }

    public function testShouldConfigurePassThrough()
    {
        \Slim\Environment::mock(array(
            "REQUEST_METHOD" => "GET"
        ));

        $rule = new RequestMethodPassthrough(array(
            "passthrough" => array("GET")
        ));

        $this->assertFalse($rule(new \Slim\Slim));
    }
}
{'fraction_non_alphanumeric': 0.12994532003859763, 'fraction_numerical': 0.005146349308459312, 'mean_word_length': 2.5912240184757507, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 23, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '4923239', 'n_tokens_mistral': 979, 'n_tokens_neox': 932, 'n_words': 159}