Exemplo n.º 1
0
 public function testPrepend()
 {
     $errors = new MultiException();
     $this->assertTrue($errors->isEmpty());
     $errors->prepend(new Exception('First'));
     $this->assertFalse($errors->isEmpty());
     $this->assertEquals(1, $errors->count());
     $errors->prepend(new Exception('Second'));
     $this->assertFalse($errors->isEmpty());
     $this->assertEquals(2, $errors->count());
     $this->assertEquals([new Exception('Second'), new Exception('First')], $errors->toArray());
 }