Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion modules/10-basics/10-hello-world/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'Hello, World!';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/10-basics/15-tags/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'King in the North!';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/10-basics/20-comments/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SolutionTest extends TestCase
{
public function test()
{
$this->expectOutputString('');
$this->assertOutput('');
$content = file_get_contents('Solution.php');
$this->assertStringContainsString('// TODO: добавить функцию приветствия', $content);
}
Expand Down
2 changes: 1 addition & 1 deletion modules/10-basics/30-instructions/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'RobertStannisRenly';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/10-basics/40-testing/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '9780262531962';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/10-basics/50-syntax-errors/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'Программа успешно запущена';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/20-basic/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '9';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/25-operator/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '8729';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/27-commutativity/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '2563';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/30-composition/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '660';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/40-priority/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '160';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/43-float/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '5.5511151231258E-17';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/20-arithmetics/45-linting/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '4';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/25-strings/10-quotes/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'The file "user\'s_config.json" was not found.';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/25-strings/15-escape-characters/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "Для разделения строк используйте \"\\n\"\nПример: print_r(\"строка1\\nстрока2\")";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'https://github.com/hexlet/exercises-php';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/25-strings/30-encoding/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "~\n^\n%\n";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/30-variables/10-definition/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "https://hexlet.io\nhttps://hexlet.io";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/30-variables/12-change/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'доставлен';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/30-variables/13-variables-naming/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "2";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "125\n863.75";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public function test()
Ожидаемая дата доставки — 3 рабочих дня.
HERE;

$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/30-variables/19-naming-style/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "2000";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/30-variables/20-magic-numbers/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "Ящиков на складе:\n102";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/31-advanced-strings/100-unicode/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "13\n7\n";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/31-advanced-strings/110-locales/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = setlocale(LC_CTYPE, 0);
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/31-advanced-strings/120-startwith/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '18';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'Здравствуйте, Анна! Ваш заказ #1337 принят.';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/31-advanced-strings/30-symbols/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'grip';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/31-advanced-strings/70-substrings/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'hexlet.io';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public function test()
Ожидаемая дата доставки: 3-5 рабочих дней.
Спасибо, что выбрали нас!
EOT;
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public function test()
Rating: 4.7
HERE;

$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '13';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'print';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '36 °C';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
2 changes: 1 addition & 1 deletion modules/35-calling-functions/100-call/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "12";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "37.8\n2426.76\n607\n";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "First: H\nLast: !";
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = '-3';
$this->expectOutputString($expected);
$this->assertOutput($expected);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class SolutionTest extends TestCase
{
public function test()
{
$randomRoll = $this->getActualOutputForAssertion();
$randomRoll = $this->solutionOutput;
$this->assertThat(
$randomRoll,
$this->logicalAnd(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = 'Hello, World!';
$this->expectOutputString($expected);
sayHello();
$this->assertOutputOf(fn () => sayHello(), $expected);
}
}
3 changes: 1 addition & 2 deletions modules/50-loops/10-while/SolutionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class SolutionTest extends TestCase
public function test()
{
$expected = "4\n3\n2\n1\nGo!";
$this->expectOutputString($expected);
printCountdown(4);
$this->assertOutputOf(fn () => printCountdown(4), $expected);
}
}
Loading
Loading