Example #1
0
 /** @test */
 function collection_can_instantiate_from_html()
 {
     $fooHtml = new Crawler('<ul><li>1</li><li>2</li><li>3</li></ul>');
     $collection = Collection::fromHtml($fooHtml, new FooHtmlMapper());
     $this->assertInstanceOf(Collection::class, $collection);
     $collection->each(function ($foo) {
         $this->assertInstanceOf(Foo::class, $foo);
     });
 }