From 3e1a50cffc880604101328067dc10ec5c9770060 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 13:56:56 +0000 Subject: [PATCH 1/4] Add unit tests for PublishAgentsCommand - Mock Illuminate\Filesystem\Filesystem for tests - Test all publish scopes and overwrite confirmations - Move test file to correct Commands directory Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com> --- agents/rules/test-rule.md | 1 + .../rules/code-style-guide.md | 0 agents_temp/rules/test-rule.md | 1 + .../skills/create-page-template.md | 0 {agents => agents_temp}/skills/create_crud.md | 0 .../skills/create_module_entity.md | 0 .../skills/media_uploader_usage.md | 0 .../skills/refactor_to_service.md | 0 agents_temp/skills/test-skill.md | 1 + .../skills/theme_patterns.md | 0 .../Commands/PublishAgentsCommandTest.php | 162 ++++++++++++++++++ 11 files changed, 165 insertions(+) create mode 100644 agents/rules/test-rule.md rename {agents => agents_temp}/rules/code-style-guide.md (100%) create mode 100644 agents_temp/rules/test-rule.md rename {agents => agents_temp}/skills/create-page-template.md (100%) rename {agents => agents_temp}/skills/create_crud.md (100%) rename {agents => agents_temp}/skills/create_module_entity.md (100%) rename {agents => agents_temp}/skills/media_uploader_usage.md (100%) rename {agents => agents_temp}/skills/refactor_to_service.md (100%) create mode 100644 agents_temp/skills/test-skill.md rename {agents => agents_temp}/skills/theme_patterns.md (100%) create mode 100644 tests/Unit/Commands/PublishAgentsCommandTest.php diff --git a/agents/rules/test-rule.md b/agents/rules/test-rule.md new file mode 100644 index 0000000..a6fa5b7 --- /dev/null +++ b/agents/rules/test-rule.md @@ -0,0 +1 @@ +Dummy Rule \ No newline at end of file diff --git a/agents/rules/code-style-guide.md b/agents_temp/rules/code-style-guide.md similarity index 100% rename from agents/rules/code-style-guide.md rename to agents_temp/rules/code-style-guide.md diff --git a/agents_temp/rules/test-rule.md b/agents_temp/rules/test-rule.md new file mode 100644 index 0000000..a6fa5b7 --- /dev/null +++ b/agents_temp/rules/test-rule.md @@ -0,0 +1 @@ +Dummy Rule \ No newline at end of file diff --git a/agents/skills/create-page-template.md b/agents_temp/skills/create-page-template.md similarity index 100% rename from agents/skills/create-page-template.md rename to agents_temp/skills/create-page-template.md diff --git a/agents/skills/create_crud.md b/agents_temp/skills/create_crud.md similarity index 100% rename from agents/skills/create_crud.md rename to agents_temp/skills/create_crud.md diff --git a/agents/skills/create_module_entity.md b/agents_temp/skills/create_module_entity.md similarity index 100% rename from agents/skills/create_module_entity.md rename to agents_temp/skills/create_module_entity.md diff --git a/agents/skills/media_uploader_usage.md b/agents_temp/skills/media_uploader_usage.md similarity index 100% rename from agents/skills/media_uploader_usage.md rename to agents_temp/skills/media_uploader_usage.md diff --git a/agents/skills/refactor_to_service.md b/agents_temp/skills/refactor_to_service.md similarity index 100% rename from agents/skills/refactor_to_service.md rename to agents_temp/skills/refactor_to_service.md diff --git a/agents_temp/skills/test-skill.md b/agents_temp/skills/test-skill.md new file mode 100644 index 0000000..9617f85 --- /dev/null +++ b/agents_temp/skills/test-skill.md @@ -0,0 +1 @@ +Dummy Skill \ No newline at end of file diff --git a/agents/skills/theme_patterns.md b/agents_temp/skills/theme_patterns.md similarity index 100% rename from agents/skills/theme_patterns.md rename to agents_temp/skills/theme_patterns.md diff --git a/tests/Unit/Commands/PublishAgentsCommandTest.php b/tests/Unit/Commands/PublishAgentsCommandTest.php new file mode 100644 index 0000000..4c84989 --- /dev/null +++ b/tests/Unit/Commands/PublishAgentsCommandTest.php @@ -0,0 +1,162 @@ +baseSourcePath = '/app/agents'; + + $this->destinationPath = base_path('.agent'); + + // Ensure destination base_path() is clean + if (File::isDirectory($this->destinationPath)) { + File::deleteDirectory($this->destinationPath); + } + } + + public function test_it_publishes_all_agents() + { + // Add a dummy file to ensure it's there + if (!File::isDirectory($this->baseSourcePath . '/rules')) { + File::makeDirectory($this->baseSourcePath . '/rules', 0755, true); + } + File::put($this->baseSourcePath . '/rules/test-rule.md', 'Dummy Rule'); + + $this->artisan('agents:publish') + ->expectsOutputToContain('Publishing dev-tool agents...') + ->expectsOutputToContain('Agents published successfully!') + ->assertExitCode(0); + + $this->assertDirectoryExists($this->destinationPath); + $this->assertDirectoryExists($this->destinationPath . '/rules'); + $this->assertFileExists($this->destinationPath . '/rules/test-rule.md'); + } + + public function test_it_publishes_only_skills() + { + // For testing purpose, since we know 'rules' exists in /app/agents, + // we'll create a dummy 'skills' dir so the publish command has something to work with. + if (!File::isDirectory($this->baseSourcePath . '/skills')) { + File::makeDirectory($this->baseSourcePath . '/skills', 0755, true); + } + File::put($this->baseSourcePath . '/skills/test-skill.md', 'Dummy Skill'); + + $this->artisan('agents:publish', ['--skills' => true]) + ->expectsOutputToContain('Publishing skills...') + ->expectsOutputToContain('Agents published successfully!') + ->assertExitCode(0); + + $this->assertDirectoryExists($this->destinationPath . '/skills'); + $this->assertFileExists($this->destinationPath . '/skills/test-skill.md'); + $this->assertFileDoesNotExist($this->destinationPath . '/rules/test-rule.md'); + + // Clean up dummy + File::deleteDirectory($this->baseSourcePath . '/skills'); + } + + public function test_it_publishes_only_rules() + { + if (!File::isDirectory($this->baseSourcePath . '/rules')) { + File::makeDirectory($this->baseSourcePath . '/rules', 0755, true); + } + File::put($this->baseSourcePath . '/rules/test-rule.md', 'Dummy Rule'); + + $this->artisan('agents:publish', ['--rules' => true]) + ->expectsOutputToContain('Publishing rules...') + ->expectsOutputToContain('Agents published successfully!') + ->assertExitCode(0); + + $this->assertDirectoryExists($this->destinationPath . '/rules'); + $this->assertFileExists($this->destinationPath . '/rules/test-rule.md'); + } + + public function test_it_asks_for_confirmation_when_file_exists() + { + if (!File::isDirectory($this->baseSourcePath . '/rules')) { + File::makeDirectory($this->baseSourcePath . '/rules', 0755, true); + } + File::put($this->baseSourcePath . '/rules/test-rule.md', 'Dummy Rule'); + + // First publish + $this->artisan('agents:publish', ['--rules' => true]) + ->assertExitCode(0); + + // Second publish, should ask for confirmation + // Note: the command outputs info using components, so it just asks using confirm + $this->artisan('agents:publish', ['--rules' => true]) + ->expectsConfirmation('File already exists: test-rule.md. Overwrite?', 'no') + ->expectsOutputToContain('Agents published successfully!') + ->assertExitCode(0); + } + + public function test_it_forces_overwrite_when_file_exists() + { + if (!File::isDirectory($this->baseSourcePath . '/rules')) { + File::makeDirectory($this->baseSourcePath . '/rules', 0755, true); + } + File::put($this->baseSourcePath . '/rules/test-rule.md', 'Dummy Rule'); + + // First publish + $this->artisan('agents:publish', ['--rules' => true]) + ->assertExitCode(0); + + // Modify the published file + File::put($this->destinationPath . '/rules/test-rule.md', 'Modified Rule'); + + // Second publish with force option + $this->artisan('agents:publish', ['--rules' => true, '--force' => true]) + ->expectsOutputToContain('Agents published successfully!') + ->assertExitCode(0); + + // Check if file was overwritten (should contain original content or at least not be our 'Modified Rule') + $this->assertNotEquals('Modified Rule', File::get($this->destinationPath . '/rules/test-rule.md')); + } + + public function test_it_returns_error_if_source_directory_does_not_exist() + { + // The command uses dirname(__DIR__, 2) . '/agents' to find the source. + // During testing, __DIR__ in the command might resolve to the symlinked package directory in vendor if this is run as a package. + // Let's write a small temporary class mock or just mock the Filesystem. + // Mocking the filesystem is easier since the command expects a Filesystem object injection. + + $mockFilesystem = \Mockery::mock(\Illuminate\Filesystem\Filesystem::class); + $mockFilesystem->shouldReceive('isDirectory')->andReturn(false); + $this->app->instance(\Illuminate\Filesystem\Filesystem::class, $mockFilesystem); + + // Get the path the command tries to check (dirname(__DIR__, 2) . '/agents' relative to the command class) + // Which is usually /app/agents or wherever the command file is located relative to + $expectedPath = dirname(__DIR__, 3) . '/src/Commands'; + // We don't know the exact string, but it should output the "Source directory does not exist" message. + + $this->artisan('agents:publish') + ->expectsOutputToContain("Source directory does not exist:") + ->assertExitCode(1); + + // Clean up mock + \Mockery::close(); + } + + protected function tearDown(): void + { + if (File::isDirectory($this->destinationPath)) { + File::deleteDirectory($this->destinationPath); + } + + parent::tearDown(); + } +} From 4eae850c0232d48ee1e32a932df33f1926ed2667 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 14:14:23 +0000 Subject: [PATCH 2/4] Fix permission denied in tests by purely mocking Filesystem - Replaced `File::makeDirectory` inside tests with Mockery expectations. - Removed destructive side-effects affecting the repository's `agents/` folder. - Fixed namespace/path issue by properly moving the file to `tests/Unit/Commands/PublishAgentsCommandTest.php`. Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com> --- .../Commands/PublishAgentsCommandTest.php | 176 +++++++++--------- 1 file changed, 90 insertions(+), 86 deletions(-) diff --git a/tests/Unit/Commands/PublishAgentsCommandTest.php b/tests/Unit/Commands/PublishAgentsCommandTest.php index 4c84989..224fcea 100644 --- a/tests/Unit/Commands/PublishAgentsCommandTest.php +++ b/tests/Unit/Commands/PublishAgentsCommandTest.php @@ -2,11 +2,15 @@ namespace Juzaweb\DevTool\Tests\Unit\Commands; -use Illuminate\Support\Facades\File; +use Illuminate\Filesystem\Filesystem; use Juzaweb\DevTool\Tests\TestCase; +use Mockery; +use Mockery\MockInterface; +use Symfony\Component\Finder\SplFileInfo; class PublishAgentsCommandTest extends TestCase { + protected MockInterface|Filesystem $files; protected string $baseSourcePath; protected string $destinationPath; @@ -14,91 +18,111 @@ protected function setUp(): void { parent::setUp(); - // The path in PublishAgentsCommand is: - // $baseSourcePath = dirname(__DIR__, 2) . '/agents'; - // In the app container, the agents are located at /app/agents - // The command will resolve dirname(__DIR__, 2) internally - // We set up baseSourcePath to explicitly use the existing agents directory for our tests to check files - $this->baseSourcePath = '/app/agents'; + $this->files = Mockery::mock(Filesystem::class); + $this->app->instance(Filesystem::class, $this->files); - $this->destinationPath = base_path('.agent'); + // The command class calculates the source directory like this: + // dirname(__DIR__, 2) . '/agents' (where __DIR__ is src/Commands) + $commandDir = realpath(__DIR__ . '/../../../src/Commands'); + $this->baseSourcePath = dirname($commandDir, 2) . '/agents'; - // Ensure destination base_path() is clean - if (File::isDirectory($this->destinationPath)) { - File::deleteDirectory($this->destinationPath); - } + $this->destinationPath = base_path('.agent'); } public function test_it_publishes_all_agents() { - // Add a dummy file to ensure it's there - if (!File::isDirectory($this->baseSourcePath . '/rules')) { - File::makeDirectory($this->baseSourcePath . '/rules', 0755, true); - } - File::put($this->baseSourcePath . '/rules/test-rule.md', 'Dummy Rule'); + $this->files->shouldReceive('isDirectory')->with($this->baseSourcePath)->once()->andReturn(true); + $this->files->shouldReceive('isDirectory')->with($this->destinationPath)->once()->andReturn(false); + $this->files->shouldReceive('makeDirectory')->with($this->destinationPath, 0755, true)->once()->andReturn(true); + + $mockFile1 = Mockery::mock(SplFileInfo::class); + $mockFile1->shouldReceive('getPathname')->andReturn($this->baseSourcePath . DIRECTORY_SEPARATOR . 'rules/test-rule.md'); + + $this->files->shouldReceive('allFiles')->with($this->baseSourcePath)->once()->andReturn([$mockFile1]); + + $this->files->shouldReceive('directories')->with($this->baseSourcePath)->once()->andReturn([$this->baseSourcePath . DIRECTORY_SEPARATOR . 'rules']); + $this->files->shouldReceive('directories')->with($this->baseSourcePath . DIRECTORY_SEPARATOR . 'rules')->once()->andReturn([]); + + $targetDir = $this->destinationPath . DIRECTORY_SEPARATOR . 'rules'; + $this->files->shouldReceive('isDirectory')->with($targetDir)->once()->andReturn(false); + $this->files->shouldReceive('makeDirectory')->with($targetDir, 0755, true)->once()->andReturn(true); + + $targetPath = $this->destinationPath . DIRECTORY_SEPARATOR . 'rules/test-rule.md'; + $this->files->shouldReceive('exists')->with($targetPath)->once()->andReturn(false); + $this->files->shouldReceive('copy')->with($this->baseSourcePath . DIRECTORY_SEPARATOR . 'rules/test-rule.md', $targetPath)->once()->andReturn(true); $this->artisan('agents:publish') ->expectsOutputToContain('Publishing dev-tool agents...') ->expectsOutputToContain('Agents published successfully!') ->assertExitCode(0); - - $this->assertDirectoryExists($this->destinationPath); - $this->assertDirectoryExists($this->destinationPath . '/rules'); - $this->assertFileExists($this->destinationPath . '/rules/test-rule.md'); } public function test_it_publishes_only_skills() { - // For testing purpose, since we know 'rules' exists in /app/agents, - // we'll create a dummy 'skills' dir so the publish command has something to work with. - if (!File::isDirectory($this->baseSourcePath . '/skills')) { - File::makeDirectory($this->baseSourcePath . '/skills', 0755, true); - } - File::put($this->baseSourcePath . '/skills/test-skill.md', 'Dummy Skill'); + $sourcePath = $this->baseSourcePath . DIRECTORY_SEPARATOR . 'skills'; + $targetDestination = $this->destinationPath . DIRECTORY_SEPARATOR . 'skills'; + + $this->files->shouldReceive('isDirectory')->with($sourcePath)->once()->andReturn(true); + $this->files->shouldReceive('isDirectory')->with($targetDestination)->once()->andReturn(false); + $this->files->shouldReceive('makeDirectory')->with($targetDestination, 0755, true)->once()->andReturn(true); + + $mockFile1 = Mockery::mock(SplFileInfo::class); + $mockFile1->shouldReceive('getPathname')->andReturn($sourcePath . DIRECTORY_SEPARATOR . 'test-skill.md'); + + $this->files->shouldReceive('allFiles')->with($sourcePath)->once()->andReturn([$mockFile1]); + $this->files->shouldReceive('directories')->with($sourcePath)->once()->andReturn([]); + + $targetPath = $targetDestination . DIRECTORY_SEPARATOR . 'test-skill.md'; + $this->files->shouldReceive('exists')->with($targetPath)->once()->andReturn(false); + $this->files->shouldReceive('copy')->with($sourcePath . DIRECTORY_SEPARATOR . 'test-skill.md', $targetPath)->once()->andReturn(true); $this->artisan('agents:publish', ['--skills' => true]) ->expectsOutputToContain('Publishing skills...') ->expectsOutputToContain('Agents published successfully!') ->assertExitCode(0); - - $this->assertDirectoryExists($this->destinationPath . '/skills'); - $this->assertFileExists($this->destinationPath . '/skills/test-skill.md'); - $this->assertFileDoesNotExist($this->destinationPath . '/rules/test-rule.md'); - - // Clean up dummy - File::deleteDirectory($this->baseSourcePath . '/skills'); } public function test_it_publishes_only_rules() { - if (!File::isDirectory($this->baseSourcePath . '/rules')) { - File::makeDirectory($this->baseSourcePath . '/rules', 0755, true); - } - File::put($this->baseSourcePath . '/rules/test-rule.md', 'Dummy Rule'); + $sourcePath = $this->baseSourcePath . DIRECTORY_SEPARATOR . 'rules'; + $targetDestination = $this->destinationPath . DIRECTORY_SEPARATOR . 'rules'; + + $this->files->shouldReceive('isDirectory')->with($sourcePath)->once()->andReturn(true); + $this->files->shouldReceive('isDirectory')->with($targetDestination)->once()->andReturn(true); + + $mockFile1 = Mockery::mock(SplFileInfo::class); + $mockFile1->shouldReceive('getPathname')->andReturn($sourcePath . DIRECTORY_SEPARATOR . 'test-rule.md'); + + $this->files->shouldReceive('allFiles')->with($sourcePath)->once()->andReturn([$mockFile1]); + $this->files->shouldReceive('directories')->with($sourcePath)->once()->andReturn([]); + + $targetPath = $targetDestination . DIRECTORY_SEPARATOR . 'test-rule.md'; + $this->files->shouldReceive('exists')->with($targetPath)->once()->andReturn(false); + $this->files->shouldReceive('copy')->with($sourcePath . DIRECTORY_SEPARATOR . 'test-rule.md', $targetPath)->once()->andReturn(true); $this->artisan('agents:publish', ['--rules' => true]) ->expectsOutputToContain('Publishing rules...') ->expectsOutputToContain('Agents published successfully!') ->assertExitCode(0); - - $this->assertDirectoryExists($this->destinationPath . '/rules'); - $this->assertFileExists($this->destinationPath . '/rules/test-rule.md'); } public function test_it_asks_for_confirmation_when_file_exists() { - if (!File::isDirectory($this->baseSourcePath . '/rules')) { - File::makeDirectory($this->baseSourcePath . '/rules', 0755, true); - } - File::put($this->baseSourcePath . '/rules/test-rule.md', 'Dummy Rule'); + $this->files->shouldReceive('isDirectory')->with($this->baseSourcePath)->once()->andReturn(true); + $this->files->shouldReceive('isDirectory')->with($this->destinationPath)->once()->andReturn(true); - // First publish - $this->artisan('agents:publish', ['--rules' => true]) - ->assertExitCode(0); + $mockFile1 = Mockery::mock(SplFileInfo::class); + $mockFile1->shouldReceive('getPathname')->andReturn($this->baseSourcePath . DIRECTORY_SEPARATOR . 'test-rule.md'); - // Second publish, should ask for confirmation - // Note: the command outputs info using components, so it just asks using confirm - $this->artisan('agents:publish', ['--rules' => true]) + $this->files->shouldReceive('allFiles')->with($this->baseSourcePath)->once()->andReturn([$mockFile1]); + $this->files->shouldReceive('directories')->with($this->baseSourcePath)->once()->andReturn([]); + + $targetPath = $this->destinationPath . DIRECTORY_SEPARATOR . 'test-rule.md'; + + $this->files->shouldReceive('exists')->with($targetPath)->once()->andReturn(true); + $this->files->shouldNotReceive('copy'); + + $this->artisan('agents:publish') ->expectsConfirmation('File already exists: test-rule.md. Overwrite?', 'no') ->expectsOutputToContain('Agents published successfully!') ->assertExitCode(0); @@ -106,57 +130,37 @@ public function test_it_asks_for_confirmation_when_file_exists() public function test_it_forces_overwrite_when_file_exists() { - if (!File::isDirectory($this->baseSourcePath . '/rules')) { - File::makeDirectory($this->baseSourcePath . '/rules', 0755, true); - } - File::put($this->baseSourcePath . '/rules/test-rule.md', 'Dummy Rule'); + $this->files->shouldReceive('isDirectory')->with($this->baseSourcePath)->once()->andReturn(true); + $this->files->shouldReceive('isDirectory')->with($this->destinationPath)->once()->andReturn(true); - // First publish - $this->artisan('agents:publish', ['--rules' => true]) - ->assertExitCode(0); + $mockFile1 = Mockery::mock(SplFileInfo::class); + $mockFile1->shouldReceive('getPathname')->andReturn($this->baseSourcePath . DIRECTORY_SEPARATOR . 'test-rule.md'); + + $this->files->shouldReceive('allFiles')->with($this->baseSourcePath)->once()->andReturn([$mockFile1]); + $this->files->shouldReceive('directories')->with($this->baseSourcePath)->once()->andReturn([]); - // Modify the published file - File::put($this->destinationPath . '/rules/test-rule.md', 'Modified Rule'); + $targetPath = $this->destinationPath . DIRECTORY_SEPARATOR . 'test-rule.md'; - // Second publish with force option - $this->artisan('agents:publish', ['--rules' => true, '--force' => true]) + $this->files->shouldReceive('exists')->with($targetPath)->once()->andReturn(true); + $this->files->shouldReceive('copy')->with($this->baseSourcePath . DIRECTORY_SEPARATOR . 'test-rule.md', $targetPath)->once()->andReturn(true); + + $this->artisan('agents:publish', ['--force' => true]) ->expectsOutputToContain('Agents published successfully!') ->assertExitCode(0); - - // Check if file was overwritten (should contain original content or at least not be our 'Modified Rule') - $this->assertNotEquals('Modified Rule', File::get($this->destinationPath . '/rules/test-rule.md')); } public function test_it_returns_error_if_source_directory_does_not_exist() { - // The command uses dirname(__DIR__, 2) . '/agents' to find the source. - // During testing, __DIR__ in the command might resolve to the symlinked package directory in vendor if this is run as a package. - // Let's write a small temporary class mock or just mock the Filesystem. - // Mocking the filesystem is easier since the command expects a Filesystem object injection. - - $mockFilesystem = \Mockery::mock(\Illuminate\Filesystem\Filesystem::class); - $mockFilesystem->shouldReceive('isDirectory')->andReturn(false); - $this->app->instance(\Illuminate\Filesystem\Filesystem::class, $mockFilesystem); - - // Get the path the command tries to check (dirname(__DIR__, 2) . '/agents' relative to the command class) - // Which is usually /app/agents or wherever the command file is located relative to - $expectedPath = dirname(__DIR__, 3) . '/src/Commands'; - // We don't know the exact string, but it should output the "Source directory does not exist" message. + $this->files->shouldReceive('isDirectory')->with($this->baseSourcePath)->once()->andReturn(false); $this->artisan('agents:publish') - ->expectsOutputToContain("Source directory does not exist:") + ->expectsOutputToContain("Source directory does not exist: {$this->baseSourcePath}") ->assertExitCode(1); - - // Clean up mock - \Mockery::close(); } protected function tearDown(): void { - if (File::isDirectory($this->destinationPath)) { - File::deleteDirectory($this->destinationPath); - } - + Mockery::close(); parent::tearDown(); } } From 9e94eecc1bbe8e0bf0badbb101966b96fe00444b Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 14:23:47 +0000 Subject: [PATCH 3/4] Fix CI failure and remove unrelated files - Ensure branch only contains the tests/Unit/Commands/PublishAgentsCommandTest.php test file. - Removed all dummy/temporary file modifications to agents/ rules and skills directories. - Full mocking of Illuminate\Filesystem\Filesystem is retained to prevent disk operations and permission issues during CI. Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com> --- {agents_temp => agents}/rules/code-style-guide.md | 0 agents/rules/test-rule.md | 1 - {agents_temp => agents}/skills/create-page-template.md | 0 {agents_temp => agents}/skills/create_crud.md | 0 {agents_temp => agents}/skills/create_module_entity.md | 0 {agents_temp => agents}/skills/media_uploader_usage.md | 0 {agents_temp => agents}/skills/refactor_to_service.md | 0 {agents_temp => agents}/skills/theme_patterns.md | 0 agents_temp/rules/test-rule.md | 1 - agents_temp/skills/test-skill.md | 1 - 10 files changed, 3 deletions(-) rename {agents_temp => agents}/rules/code-style-guide.md (100%) delete mode 100644 agents/rules/test-rule.md rename {agents_temp => agents}/skills/create-page-template.md (100%) rename {agents_temp => agents}/skills/create_crud.md (100%) rename {agents_temp => agents}/skills/create_module_entity.md (100%) rename {agents_temp => agents}/skills/media_uploader_usage.md (100%) rename {agents_temp => agents}/skills/refactor_to_service.md (100%) rename {agents_temp => agents}/skills/theme_patterns.md (100%) delete mode 100644 agents_temp/rules/test-rule.md delete mode 100644 agents_temp/skills/test-skill.md diff --git a/agents_temp/rules/code-style-guide.md b/agents/rules/code-style-guide.md similarity index 100% rename from agents_temp/rules/code-style-guide.md rename to agents/rules/code-style-guide.md diff --git a/agents/rules/test-rule.md b/agents/rules/test-rule.md deleted file mode 100644 index a6fa5b7..0000000 --- a/agents/rules/test-rule.md +++ /dev/null @@ -1 +0,0 @@ -Dummy Rule \ No newline at end of file diff --git a/agents_temp/skills/create-page-template.md b/agents/skills/create-page-template.md similarity index 100% rename from agents_temp/skills/create-page-template.md rename to agents/skills/create-page-template.md diff --git a/agents_temp/skills/create_crud.md b/agents/skills/create_crud.md similarity index 100% rename from agents_temp/skills/create_crud.md rename to agents/skills/create_crud.md diff --git a/agents_temp/skills/create_module_entity.md b/agents/skills/create_module_entity.md similarity index 100% rename from agents_temp/skills/create_module_entity.md rename to agents/skills/create_module_entity.md diff --git a/agents_temp/skills/media_uploader_usage.md b/agents/skills/media_uploader_usage.md similarity index 100% rename from agents_temp/skills/media_uploader_usage.md rename to agents/skills/media_uploader_usage.md diff --git a/agents_temp/skills/refactor_to_service.md b/agents/skills/refactor_to_service.md similarity index 100% rename from agents_temp/skills/refactor_to_service.md rename to agents/skills/refactor_to_service.md diff --git a/agents_temp/skills/theme_patterns.md b/agents/skills/theme_patterns.md similarity index 100% rename from agents_temp/skills/theme_patterns.md rename to agents/skills/theme_patterns.md diff --git a/agents_temp/rules/test-rule.md b/agents_temp/rules/test-rule.md deleted file mode 100644 index a6fa5b7..0000000 --- a/agents_temp/rules/test-rule.md +++ /dev/null @@ -1 +0,0 @@ -Dummy Rule \ No newline at end of file diff --git a/agents_temp/skills/test-skill.md b/agents_temp/skills/test-skill.md deleted file mode 100644 index 9617f85..0000000 --- a/agents_temp/skills/test-skill.md +++ /dev/null @@ -1 +0,0 @@ -Dummy Skill \ No newline at end of file From 80fd06eb512503e8eb99a9159309a31642b5d7b4 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 14:40:29 +0000 Subject: [PATCH 4/4] Move PublishAgentsCommandTest to root Unit directory - Moved test file from tests/Unit/Commands to tests/Unit. - Updated namespace from Juzaweb\DevTool\Tests\Unit\Commands to Juzaweb\DevTool\Tests\Unit to match directory structure. - Adjusted the baseSourcePath calculation to account for the new directory depth. Co-authored-by: juzaweb <47020363+juzaweb@users.noreply.github.com> --- tests/Unit/{Commands => }/PublishAgentsCommandTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename tests/Unit/{Commands => }/PublishAgentsCommandTest.php (97%) diff --git a/tests/Unit/Commands/PublishAgentsCommandTest.php b/tests/Unit/PublishAgentsCommandTest.php similarity index 97% rename from tests/Unit/Commands/PublishAgentsCommandTest.php rename to tests/Unit/PublishAgentsCommandTest.php index 224fcea..4ece9ff 100644 --- a/tests/Unit/Commands/PublishAgentsCommandTest.php +++ b/tests/Unit/PublishAgentsCommandTest.php @@ -1,6 +1,6 @@ baseSourcePath = dirname($commandDir, 2) . '/agents'; $this->destinationPath = base_path('.agent');