Skip to content

Commit

Permalink
Add tests for indent and line-ending
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanthewiz committed Nov 17, 2023
1 parent bfa00fe commit e58aaad
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Fixtures/indent/pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"indent": "\t"
}
3 changes: 3 additions & 0 deletions tests/Fixtures/line-ending/pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"line-ending": "\r\n"
}
12 changes: 12 additions & 0 deletions tests/Unit/Repositories/ConfigurationJsonRepositoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
]);
});

it('may have an indent option', function () {
$repository = new ConfigurationJsonRepository(dirname(__DIR__, 2).'/Fixtures/indent/pint.json', null);

expect($repository->indent())->toBe("\t");
});

it('may have a line ending option', function () {
$repository = new ConfigurationJsonRepository(dirname(__DIR__, 2).'/Fixtures/line-ending/pint.json', null);

expect($repository->lineEnding())->toBe("\r\n");
});

it('may have a preset option', function () {
$repository = new ConfigurationJsonRepository(dirname(__DIR__, 2).'/Fixtures/preset/pint.json', null);

Expand Down

0 comments on commit e58aaad

Please sign in to comment.