<commit_before><?php

/*
 * This file is part of the mingyoung/dingtalk.
 *
 * (c) 张铭阳 <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace EasyDingTalk\Tests;

use EasyDingTalk\Application;

class ApplicationTest extends TestCase
{
    /** @test */
    public function services()
    {
        $app = new Application();

        $services = [
            'config' => \Overtrue\Http\Support\Collection::class,
            'access_token' => \EasyDingTalk\Kernel\AccessToken::class,
            'client' => \EasyDingTalk\Kernel\Http\Client::class,
            'user' => \EasyDingTalk\User\Client::class,
            'chat' => \EasyDingTalk\Chat\Client::class,
            'department' => \EasyDingTalk\Department\Client::class,
            'report' => \EasyDingTalk\Report\Client::class,
        ];

        $this->assertCount(count($services), $app->keys());
        foreach ($services as $name => $service) {
            $this->assertInstanceof($service, $app->{$name});
            $this->assertInstanceof($service, $app[$name]);
        }
    }
}<commit_msg>[feat]: Role Test<commit_after><?php

/*
 * This file is part of the mingyoung/dingtalk.
 *
 * (c) 张铭阳 <<EMAIL>>
 *
 * This source file is subject to the MIT license that is bundled
 * with this source code in the file LICENSE.
 */

namespace EasyDingTalk\Tests;

use EasyDingTalk\Application;

class ApplicationTest extends TestCase
{
    /** @test */
    public function services()
    {
        $app = new Application();

        $services = [
            'config' => \Overtrue\Http\Support\Collection::class,
            'access_token' => \EasyDingTalk\Kernel\AccessToken::class,
            'client' => \EasyDingTalk\Kernel\Http\Client::class,
            'user' => \EasyDingTalk\User\Client::class,
            'chat' => \EasyDingTalk\Chat\Client::class,
            'department' => \EasyDingTalk\Department\Client::class,
            'report' => \EasyDingTalk\Report\Client::class,
            'role'=> \EasyDingTalk\Role\Client::class,
        ];

        $this->assertCount(count($services), $app->keys());
        foreach ($services as $name => $service) {
            $this->assertInstanceof($service, $app->{$name});
            $this->assertInstanceof($service, $app[$name]);
        }
    }
}
{'fraction_non_alphanumeric': 0.15172120696982574, 'fraction_numerical': 0.0, 'mean_word_length': 2.5558912386706947, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 34, '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': '5738596', 'n_tokens_mistral': 740, 'n_tokens_neox': 699, 'n_words': 148}