Skip to content

Commit 35bff4e

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 35bff4e

File tree

5 files changed

+5
-267
lines changed

5 files changed

+5
-267
lines changed

src/agent/src/Bridge/OpenMeteo/Tests/OpenMeteoTest.php

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

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

1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\AI\Agent\Bridge\OpenMeteo\OpenMeteo;
@@ -20,7 +20,7 @@ final class OpenMeteoTest extends TestCase
2020
{
2121
public function testCurrent()
2222
{
23-
$result = JsonMockResponse::fromFile(__DIR__.'/fixtures/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/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
}

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

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

src/agent/tests/Toolbox/Tool/OpenMeteoTest.php

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

src/agent/tests/fixtures/Tool/openmeteo-current.json

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

src/agent/tests/fixtures/Tool/openmeteo-forecast.json

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

0 commit comments

Comments
 (0)