]> git.localhorst.tv Git - alttp.git/blob - tests/Unit/Models/ChatLogTest.php
update muffins tracker
[alttp.git] / tests / Unit / Models / ChatLogTest.php
1 <?php
2
3 namespace Tests\Unit\Models;
4
5 use App\Models\ChatLog;
6 use PHPUnit\Framework\TestCase;
7
8 class ChatLogTest extends TestCase {
9
10         public function test_classification() {
11                 $this->assertEquals('gg', ChatLog::classify('gg'));
12                 $this->assertEquals('gg', ChatLog::classify('GG'));
13                 $this->assertEquals('gg', ChatLog::classify('Gg'));
14
15                 $this->assertEquals('gl', ChatLog::classify('glhf'));
16                 $this->assertEquals('gl', ChatLog::classify('gl & hf'));
17
18                 $this->assertEquals('hi', ChatLog::classify('hi'));
19                 $this->assertEquals('hi', ChatLog::classify('hallo'));
20                 $this->assertNotEquals('hi', ChatLog::classify('hier steht was'));
21
22                 $this->assertEquals('hype', ChatLog::classify('122 Hype!'));
23
24                 $this->assertEquals('number', ChatLog::classify('13'));
25                 $this->assertEquals('number', ChatLog::classify('22'));
26
27                 $this->assertEquals('lol', ChatLog::classify('haha'));
28                 $this->assertEquals('lol', ChatLog::classify('KEKW'));
29                 $this->assertEquals('lol', ChatLog::classify('LUL'));
30
31                 $this->assertEquals('o7', ChatLog::classify('o7'));
32
33                 $this->assertEquals('pog', ChatLog::classify('Pog'));
34
35                 $this->assertEquals('unclassified', ChatLog::classify(''));
36         }
37
38 }