<commit_before><?php

// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

namespace Tests;

use App\Http\Middleware\AuthApi;
use App\Http\Middleware\RequireScopes;
use App\Models\OAuth\Client;
use App\Models\User;
use Illuminate\Routing\Route;
use Laravel\Passport\Exceptions\MissingScopeException;
use Request;

class RequireScopesTest extends TestCase
{
    protected $next;
    protected $request;
    protected $user;

    /**
     * @dataProvider clientCredentialsTestDataProvider
     */
    public function testClientCredentials($scopes, $expectedException)
    {
        $this->setRequest(['public']);
        $this->setUser(null, ['public']);<commit_msg>unused imports<commit_after><?php

// Copyright (c) ppy Pty Ltd <<EMAIL>>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.

namespace Tests;

use App\Http\Middleware\RequireScopes;
use App\Models\User;
use Illuminate\Routing\Route;
use Laravel\Passport\Exceptions\MissingScopeException;
use Request;

class RequireScopesTest extends TestCase
{
    protected $next;
    protected $request;
    protected $user;

    /**
     * @dataProvider clientCredentialsTestDataProvider
     */
    public function testClientCredentials($scopes, $expectedException)
    {
        $this->setRequest(['public']);
        $this->setUser(null, ['public']);
{'fraction_non_alphanumeric': 0.10659560293137908, 'fraction_numerical': 0.002664890073284477, 'mean_word_length': 4.074324324324325, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '6172653', 'n_tokens_mistral': 426, 'n_tokens_neox': 435, 'n_words': 122}