Skip to content

Commit

Permalink
add generate stub successfully with without any replaces tests
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed May 15, 2024
1 parent d21fdf5 commit 40ecfd0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Feature/LaravelStubTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,18 @@
assertFileExists(__DIR__ . '/../App/new-test.php');
assertFileDoesNotExist(__DIR__ . '/../App/test.stub');
});

test('generate stub successfully with without any replaces', function () {
$stub = __DIR__ . '/test.stub';

$generate = LaravelStub::from($stub)
->to(__DIR__ . '/../App')
->name('new-test')
->ext('php')
->moveStub()
->generate();

assertTrue($generate);
assertFileExists(__DIR__ . '/../App/new-test.php');
assertFileDoesNotExist(__DIR__ . '/../App/test.stub');
});

0 comments on commit 40ecfd0

Please sign in to comment.