mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2025-12-12 04:12:13 +00:00
Removed PHP5 (no longer supported) Renamed PHP7 to PHP - consistent with other kata Added the same helpers as other PHP Kata Updated the code to PHP7.2+ standard Didn't change GildedRose updateQuality method Updated GildedRoseTest (still failing) Added ApprovalTest (passing) - same text file as texttests / ThirtyDays / stdout.gr (only renamed).
25 lines
468 B
PHP
25 lines
468 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests;
|
|
|
|
use ApprovalTests\Approvals;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class ApprovalTest extends TestCase
|
|
{
|
|
public function testTestFixture(): void
|
|
{
|
|
$argv[0] = 'texttest_fixture.php';
|
|
$argv[1] = 31;
|
|
|
|
ob_start();
|
|
require_once __DIR__ . '/../fixtures/texttest_fixture.php';
|
|
$output = ob_get_contents();
|
|
ob_end_clean();
|
|
|
|
Approvals::verifyString($output);
|
|
}
|
|
}
|