Skip to content

Commit

Permalink
isPhp() tests
Browse files Browse the repository at this point in the history
  • Loading branch information
faissaloux committed Oct 12, 2024
1 parent 99e2063 commit f8e4a98
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Unit/helpers/isPhp.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

uses()->group('helpers');

it('returns true when is php file', function (): void {
expect(isPhp('file.php'))->toBeTrue();
});

it('returns false when is not php file', function (): void {
expect(isPhp('file.js'))->toBeFalse();
});

it('returns false when is dir', function (): void {
expect(isPhp('directory'))->toBeFalse();
});

0 comments on commit f8e4a98

Please sign in to comment.