Esempio n. 1
0
 /** @test */
 public function it_filters_fields_of_type()
 {
     $builder = new FormBuilder();
     $builder->text('test', 'Test')->submit('send', 'send');
     $this->assertCount(1, $builder->fieldsOfType(Text::class));
     $this->assertInstanceOf(Text::class, $builder->fieldsOfType(Text::class)['test']);
     $this->assertCount(2, $builder->fieldsOfType(AbstractType::class));
     $this->assertCount(0, $builder->fieldsOfType(Textarea::class));
 }