File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
src/store/tests/Document/Loader Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1515use PHPUnit \Framework \TestCase ;
1616use Symfony \AI \Store \Document \Loader \TextFileLoader ;
1717use Symfony \AI \Store \Document \TextDocument ;
18+ use Symfony \AI \Store \Exception \InvalidArgumentException ;
1819use Symfony \AI \Store \Exception \RuntimeException ;
1920
2021#[CoversClass(TextFileLoader::class)]
2122final class TextFileLoaderTest extends TestCase
2223{
24+ public function testLoadWithNullSource ()
25+ {
26+ $ loader = new TextFileLoader ();
27+
28+ $ this ->expectException (InvalidArgumentException::class);
29+ $ this ->expectExceptionMessage ('TextFileLoader requires a file path as source, null given. ' );
30+
31+ iterator_to_array ($ loader ->load (null ));
32+ }
33+
2334 public function testLoadWithInvalidSource ()
2435 {
2536 $ loader = new TextFileLoader ();
You can’t perform that action at this time.
0 commit comments