Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor #197

Merged
merged 5 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"require-dev": {
"fakerphp/faker": "^1.19.1",
"friendsofphp/php-cs-fixer": "^3.8.0",
"jetbrains/phpstorm-attributes": "^1.0",
"mockery/mockery": "^1.4.4",
"orchestra/testbench": "^8.15",
"php-standard-library/psalm-plugin": "^2.3",
Expand Down
44 changes: 43 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/Abstracts/Providers/MiddlewareServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ abstract class MiddlewareServiceProvider extends MainServiceProvider
* The application's route middleware.
*
* @var array<string, class-string|string>
*
* @deprecated
*/
protected array $routeMiddleware = [];

Expand Down
2 changes: 1 addition & 1 deletion src/Generator/GeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ protected function getStubContent(): string
// Check if the custom file exists
if (!$this->fileSystem->exists($file)) {
// It does not exist - so take the default file!
$path = __DIR__ . 'GeneratorCommand.php/' . self::STUB_PATH;
$path = __DIR__ . '/' . self::STUB_PATH;
$file = str_replace('*', $this->stubName, $path);
}

Expand Down
2 changes: 0 additions & 2 deletions src/Loaders/ProvidersLoaderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

trait ProvidersLoaderTrait
{
public array $serviceProviders = [];

/**
* Loads only the Main Service Providers from the Containers.
* All the Service Providers (registered inside the main), will be
Expand Down
10 changes: 5 additions & 5 deletions src/Traits/TestTraits/PhpUnit/TestAssertionHelperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,23 +97,23 @@ protected function getInaccessiblePropertyValue(object $object, string $property
}

/**
* Create a spy for a task with a specified repository instance.
* Create a spy for an Action, SubAction or a Task that uses a repository.
*
* @param string $taskClassName the task class name
* @param string $className the Action, SubAction or a Task class name
* @param string $repositoryClassName the repository class name
*/
protected function createTaskSpyWithRepository(string $taskClassName, string $repositoryClassName, bool $allowRun = true): MockInterface
protected function createSpyWithRepository(string $className, string $repositoryClassName, bool $allowRun = true): MockInterface
{
/** @var MockInterface $taskSpy */
$taskSpy = \Mockery::mock($taskClassName, [app($repositoryClassName)])
$taskSpy = \Mockery::mock($className, [app($repositoryClassName)])
->shouldIgnoreMissing(null, true)
->makePartial();

if ($allowRun) {
$taskSpy->allows('run')->andReturn();
}

$this->swap($taskClassName, $taskSpy);
$this->swap($className, $taskSpy);

return $taskSpy;
}
Expand Down
Loading