Skip to content

Commit 0630af0

Browse files
committed
test(Helpers): inline expected strings in excerpt assertions
1 parent c7c77af commit 0630af0

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

‎tests/system/Helpers/TextHelperTest.php‎

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -452,30 +452,24 @@ public function testExcerptRadius(): void
452452

453453
public function testExcerptPhraseNotFound(): void
454454
{
455-
$result = ' Once upon a time, a framework had no tests. It sad So some nice people began to write tests. The more time that went on, the happier it became. ...';
456455
$this->assertSame(
457-
$result,
456+
' Once upon a time, a framework had no tests. It sad So some nice people began to write tests. The more time that went on, the happier it became. ...',
458457
excerpt($this->longString, 'nonexistent'),
459458
);
460-
461-
$multibyteResult = ' Давным-давно во фреймворке не было тестов. Это печ льно. И вот несколько хороших людей начали писать тесты. Чем больше времени проходило, тем ...';
462459
$this->assertSame(
463-
$multibyteResult,
460+
' Давным-давно во фреймворке не было тестов. Это печ льно. И вот несколько хороших людей начали писать тесты. Чем больше времени проходило, тем ...',
464461
excerpt($this->mbLongString, 'несуществующее'),
465462
);
466463
}
467464

468465
public function testExcerptOddRadius(): void
469466
{
470-
$result = ' Once upon a time, a framework had no tests. It sad So some nice people began to write tests. The more time that went on, the happier it became. ...';
471467
$this->assertSame(
472-
$result,
468+
' Once upon a time, a framework had no tests. It sad So some nice people began to write tests. The more time that went on, the happier it became. ...',
473469
excerpt($this->longString, null, 101),
474470
);
475-
476-
$multibyteResult = ' Давным-давно во фреймворке не было тестов. Это печ льно. И вот несколько хороших людей начали писать тесты. Чем больше времени проходило, тем ...';
477471
$this->assertSame(
478-
$multibyteResult,
472+
' Давным-давно во фреймворке не было тестов. Это печ льно. И вот несколько хороших людей начали писать тесты. Чем больше времени проходило, тем ...',
479473
excerpt($this->mbLongString, null, 101),
480474
);
481475
}

0 commit comments

Comments
 (0)