Пример #1
0
 public function testAddedErrorsAreDisplayed()
 {
     Form::setDefaultTranslator(null);
     $element = new FileElement('baz');
     $element->addError('TestError3');
     $adapter = new TestAsset\MockFileAdapter();
     $element->setTransferAdapter($adapter);
     $this->assertTrue($element->hasErrors());
     $messages = $element->getMessages();
     $this->assertContains('TestError3', $messages);
 }