Example #1
0
 public function testErrors()
 {
     $this->assertFalse($this->context->hasErrors());
     $this->assertSame([], $this->context->getErrors());
     $this->context->addError(new Error());
     $this->assertTrue($this->context->hasErrors());
     $this->assertCount(1, $this->context->getErrors());
     $this->context->resetErrors();
     $this->assertFalse($this->context->hasErrors());
     $this->assertSame([], $this->context->getErrors());
 }