-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathTextTest.php
48 lines (35 loc) · 1.7 KB
/
TextTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
declare(strict_types=1);
namespace PhpSpellcheck\Tests;
use PHPUnit\Framework\TestCase;
use function PhpSpellcheck\t;
class TextTest extends TestCase
{
public const CONTENT_STUB = <<<TEXT
Tigr, tiger, burning страх.
In theforests of the night,
What imortal hand or eey
CCould frame thy fearful symmetry?
TEXT;
public const CONTENT_STUB_JP = <<<TEXT
さよなら解決なる
さよなら
解決なる
TEXT;
public const CONTENT_STUB_RU = <<<TEXT
Используйте этот инструмент для обнаружения опечаток, граматических и стилистических ошибок в англиских текстах.
Пример (с ошибками:
наведите мышь на подсвечиваемые слова, чтобы просмотреть опсание и, при наличии, варианта исправления ошибки.
Для проверки собственного текста, щёлкните на текстовое поле , вставьте свой текст и нажмите на кнопку "Отправить".
TEXT;
public function testContextOverridingMerge(): void
{
$text = t('test', ['idx' => '1'])->mergeContext(['idx' => 'foo', 'idx2' => '2']);
$this->assertEquals(t('test', ['idx' => 'foo', 'idx2' => '2']), $text);
}
public function testContextNonOverridingMerge(): void
{
$text = t('test', ['idx' => '1'])->mergeContext(['idx' => 'foo', 'idx2' => '2'], false);
$this->assertEquals(t('test', ['idx' => '1', 'idx2' => '2']), $text);
}
}