validate() public méthode

public validate ( )
 /**
  * @test
  */
 public function shouldAddErrorClassIfClassGiven()
 {
     //given
     $product = new Product(array());
     $product->validate();
     $formBuilder = new ModelFormBuilder($product);
     //when
     $html = $formBuilder->textField('name', array('class' => 'class1 class2'));
     //then
     $this->assertContains('class="class1 class2 error"', $html);
 }