Skip to content

Commit

Permalink
Merge pull request #93 from savannabits/4.x-dev
Browse files Browse the repository at this point in the history
New Test: Testing the convertPathToNamespace helper method
  • Loading branch information
coolsam726 authored Apr 19, 2024
2 parents 143ad88 + f3665ca commit 8c814dd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Unit/ModulesSingletonTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

use Coolsam\Modules\Facades\FilamentModules;

test('can convert path to namespace correctly', function () {
$path = DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'Providers' . DIRECTORY_SEPARATOR . 'AppServiceProvider.php';
$namespace = FilamentModules::convertPathToNamespace($path);
expect($namespace)->toBe($expected = 'Modules\\Providers\\AppServiceProvider', "Expected $expected Instead got " . $namespace);
});

0 comments on commit 8c814dd

Please sign in to comment.