Skip to content

Commit c8a6db8

Browse files
committed
Remove duplicate OpenMeteo tool and move to Bridge structure
The OpenMeteo tool was duplicated in both Toolbox/Tool and Bridge/OpenMeteo directories. This commit removes the duplicate and ensures everything uses the Bridge structure. Changes: - Remove src/agent/src/Toolbox/Tool/OpenMeteo.php - Move tests from tests/Toolbox/Tool to tests/Bridge/OpenMeteo - Move fixtures from fixtures/Tool to fixtures/Bridge/OpenMeteo - Rename fixture files from openmeteo-*.json to *.json - Update test to use Bridge namespace and new fixture paths
1 parent 1497ab1 commit c8a6db8

File tree

4 files changed

+6
-138
lines changed

4 files changed

+6
-138
lines changed

src/agent/src/Toolbox/Tool/OpenMeteo.php

Lines changed: 0 additions & 132 deletions
This file was deleted.

src/agent/tests/Toolbox/Tool/OpenMeteoTest.php renamed to src/agent/tests/Bridge/OpenMeteo/Tests/OpenMeteoTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\AI\Agent\Tests\Toolbox\Tool;
12+
namespace Symfony\AI\Agent\Tests\Bridge\OpenMeteo;
1313

1414
use PHPUnit\Framework\TestCase;
15-
use Symfony\AI\Agent\Toolbox\Tool\OpenMeteo;
15+
use Symfony\AI\Agent\Bridge\OpenMeteo\OpenMeteo;
1616
use Symfony\Component\HttpClient\MockHttpClient;
1717
use Symfony\Component\HttpClient\Response\JsonMockResponse;
1818

1919
final class OpenMeteoTest extends TestCase
2020
{
2121
public function testCurrent()
2222
{
23-
$result = JsonMockResponse::fromFile(__DIR__.'/../../fixtures/Tool/openmeteo-current.json');
23+
$result = JsonMockResponse::fromFile(__DIR__.'/Fixtures/current.json');
2424
$httpClient = new MockHttpClient($result);
2525

2626
$openMeteo = new OpenMeteo($httpClient);
@@ -33,12 +33,12 @@ public function testCurrent()
3333
'wind_speed' => '10.7km/h',
3434
];
3535

36-
$this->assertSame($expected, $actual);
36+
self::assertSame($expected, $actual);
3737
}
3838

3939
public function testForecast()
4040
{
41-
$result = JsonMockResponse::fromFile(__DIR__.'/../../fixtures/Tool/openmeteo-forecast.json');
41+
$result = JsonMockResponse::fromFile(__DIR__.'/Fixtures/forecast.json');
4242
$httpClient = new MockHttpClient($result);
4343

4444
$openMeteo = new OpenMeteo($httpClient);
@@ -65,6 +65,6 @@ public function testForecast()
6565
],
6666
];
6767

68-
$this->assertSame($expected, $actual);
68+
self::assertSame($expected, $actual);
6969
}
7070
}

0 commit comments

Comments
 (0)