mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-13 17:49:25 +00:00
Style ApprovalTest fix formatting
This commit is contained in:
1 parent
e4946ea50e
commit
5ed256af31
1 file changed
+7
-7
@@ -11,7 +11,7 @@ use ApprovalTests\Approvals;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This unit test uses [Approvals](https://github.com/approvals/ApprovalTests.php).
|
* This unit test uses [Approvals](https://github.com/approvals/ApprovalTests.php).
|
||||||
*
|
*
|
||||||
* There are two test cases here with different styles:
|
* There are two test cases here with different styles:
|
||||||
* <li>"foo" is more similar to the unit test from the 'Java' version
|
* <li>"foo" is more similar to the unit test from the 'Java' version
|
||||||
* <li>"thirtyDays" is more similar to the TextTest from the 'Java' version
|
* <li>"thirtyDays" is more similar to the TextTest from the 'Java' version
|
||||||
@@ -21,22 +21,22 @@ use ApprovalTests\Approvals;
|
|||||||
class ApprovalTest extends TestCase
|
class ApprovalTest extends TestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public function testFoo(): void
|
public function testFoo(): void
|
||||||
{
|
{
|
||||||
$items = [new Item('foo', 0, 0)];
|
$items = [new Item('foo', 0, 0)];
|
||||||
$app = new GildedRose($items);
|
$app = new GildedRose($items);
|
||||||
$app->updateQuality();
|
$app->updateQuality();
|
||||||
|
|
||||||
Approvals::verifyList($items);
|
Approvals::verifyList($items);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testThirtyDays(): void
|
public function testThirtyDays(): void
|
||||||
{
|
{
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
$argv = ["", "30"];
|
$argv = ["", "30"];
|
||||||
include(__DIR__.'/../fixtures/texttest_fixture.php');
|
include(__DIR__ . '/../fixtures/texttest_fixture.php');
|
||||||
|
|
||||||
$output = ob_get_clean();
|
$output = ob_get_clean();
|
||||||
|
|
||||||
Approvals::approveString($output);
|
Approvals::approveString($output);
|
||||||
|
|||||||
Reference in new issue
Block a user