Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Dec 24, 2024
1 parent 9ad3f05 commit c014788
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Workbench.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class Workbench extends \Orchestra\Testbench\Workbench\Workbench

/**
* Get the path to the application (Laravel) folder.
*
* @no-named-arguments
*/
public static function applicationPath(array|string $path = ''): string
{
Expand All @@ -32,6 +34,8 @@ public static function applicationPath(array|string $path = ''): string
/**
* Get the path to the Laravel application skeleton.
*
* @no-named-arguments
*
* @see \Orchestra\Workbench\Workbench::applicationPath()
*/
public static function laravelPath(array|string $path = ''): string
Expand All @@ -41,6 +45,8 @@ public static function laravelPath(array|string $path = ''): string

/**
* Get the path to the package folder.
*
* @no-named-arguments
*/
public static function packagePath(array|string $path = ''): string
{
Expand All @@ -51,6 +57,8 @@ public static function packagePath(array|string $path = ''): string

/**
* Get the path to the workbench folder.
*
* @no-named-arguments
*/
public static function path(array|string $path = ''): string
{
Expand Down
6 changes: 6 additions & 0 deletions tests/Console/CommandTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ protected function assertCommandExecutedWithDevTool(bool $prefix = true): void
{
$workingPath = static::stubWorkingPath();

$this->assertDirectoryExists(join_paths($workingPath, 'workbench', 'app'));
$this->assertDirectoryExists(join_paths($workingPath, 'workbench', 'app', 'Models'));
$this->assertDirectoryExists(join_paths($workingPath, 'workbench', 'app', 'Providers'));
$this->assertDirectoryExists(join_paths($workingPath, 'workbench', 'database'));
$this->assertDirectoryExists(join_paths($workingPath, 'workbench', 'database', 'factories'));
$this->assertDirectoryExists(join_paths($workingPath, 'workbench', 'database', 'seeders'));

Expand Down Expand Up @@ -93,7 +95,11 @@ protected function assertCommandExecutedWithoutDevTool(bool $prefix = true): voi
$workingPath = static::stubWorkingPath();

$this->assertDirectoryDoesNotExist(join_paths($workingPath, 'workbench', 'app'));
$this->assertDirectoryDoesNotExist(join_paths($workingPath, 'workbench', 'app', 'Models'));
$this->assertDirectoryDoesNotExist(join_paths($workingPath, 'workbench', 'app', 'Providers'));
$this->assertDirectoryDoesNotExist(join_paths($workingPath, 'workbench', 'database'));
$this->assertDirectoryDoesNotExist(join_paths($workingPath, 'workbench', 'database', 'factories'));
$this->assertDirectoryDoesNotExist(join_paths($workingPath, 'workbench', 'database', 'seeders'));
}

/**
Expand Down

0 comments on commit c014788

Please sign in to comment.