Skip to content

Commit 668119c

Browse files
committed
test: fixes old, now invalid args
1 parent 9e6a1a5 commit 668119c

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

tests/unit/Tools/DTO/FunctionDeclarationTest.php

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,7 @@ public function parameterTypesProvider(): array
8080
{
8181
return [
8282
'null' => [null],
83-
'string' => ['simple string parameter'],
84-
'number' => [42],
85-
'float' => [3.14],
86-
'boolean' => [true],
8783
'array' => [['key' => 'value']],
88-
'object' => [(object) ['property' => 'value']],
8984
'complex schema' => [[
9085
'type' => 'object',
9186
'properties' => [
@@ -127,14 +122,9 @@ public function testJsonSchema(): void
127122
$this->assertArrayHasKey('description', $schema['properties'][FunctionDeclaration::KEY_DESCRIPTION]);
128123

129124
// Check parameters property allows multiple types
130-
$paramTypes = $schema['properties'][FunctionDeclaration::KEY_PARAMETERS]['type'];
131-
$this->assertIsArray($paramTypes);
132-
$this->assertContains('string', $paramTypes);
133-
$this->assertContains('number', $paramTypes);
134-
$this->assertContains('boolean', $paramTypes);
135-
$this->assertContains('object', $paramTypes);
136-
$this->assertContains('array', $paramTypes);
137-
$this->assertContains('null', $paramTypes);
125+
// Parameters should be object type (for JSON schema)
126+
$this->assertEquals('object', $schema['properties'][FunctionDeclaration::KEY_PARAMETERS]['type']);
127+
$this->assertTrue($schema['properties'][FunctionDeclaration::KEY_PARAMETERS]['additionalProperties']);
138128

139129
// Check required fields - parameters should NOT be required
140130
$this->assertArrayHasKey('required', $schema);

0 commit comments

Comments
 (0)