Skip to content

Commit

Permalink
Improved test
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Feb 18, 2024
1 parent 310b18b commit 0fd76e8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/PhpTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,22 @@ public function testToArray()
$this->assertEquals([1, 1, 1], $embedding->toArray());
}

public function testInvalidObject()
public function testInvalidInteger()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Expected array');

new Vector(1);
}

public function testInvalidObject()
{
$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Expected array');

new Vector(['a' => 1]);
}

public function testInvalidString()
{
$this->expectException(InvalidArgumentException::class);
Expand Down

0 comments on commit 0fd76e8

Please sign in to comment.