Skip to content

Commit

Permalink
refactor: using pest function to define app path
Browse files Browse the repository at this point in the history
  • Loading branch information
Stiven Katuuk committed Feb 4, 2023
1 parent 1a28f0c commit a8cec7c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

it(description: 'can generate new DTO')
->tap(function () {
$filePath = app_path(path: 'DataTransferObjects/Post/PostData.php');
$filePath = base_path(path: applicationPath() . '/DataTransferObjects/Post/PostData.php');

expect(value: File::exists(path: $filePath))->toBeFalse();

Expand All @@ -28,7 +28,7 @@

it(description: 'can generate new DTO with separator')
->tap(function () {
$filePath = app_path(path: 'DataTransferObjects/Post/Foo/BarData.php');
$filePath = base_path(path: applicationPath() . '/DataTransferObjects/Post/Foo/BarData.php');

expect(value: File::exists(path: $filePath))->toBeFalse();

Expand All @@ -49,7 +49,7 @@

it(description: 'can force generate exists DTO')
->tap(function () {
$filePath = app_path(path: 'DataTransferObjects/Post/PostData.php');
$filePath = base_path(path: applicationPath() . '/DataTransferObjects/Post/PostData.php');

expect(value: File::exists(path: $filePath))->toBeFalse();

Expand All @@ -69,7 +69,7 @@

it(description: 'cannot generate the DTO, if the DTO already exists')
->tap(function () {
$filePath = app_path(path: 'DataTransferObjects/Post/PostData.php');
$filePath = base_path(path: applicationPath() . '/DataTransferObjects/Post/PostData.php');

expect(value: File::exists(path: $filePath))->toBeFalse();

Expand Down

0 comments on commit a8cec7c

Please sign in to comment.