Example #1
0
 /** @test */
 public function a_section_can_be_removed()
 {
     $this->form->section('foo');
     $this->form->section('bar');
     $this->form->section('baz');
     $this->assertTrue($this->form->hasSections());
     $this->assertEquals(3, $this->form->count());
     $this->assertEquals('foo', $this->form->first()->id);
     $this->assertEquals('baz', $this->form->last()->id);
     $this->form->pull('baz');
     $this->assertTrue($this->form->hasSections());
     $this->assertEquals(2, $this->form->count());
     $this->assertEquals('foo', $this->form->first()->id);
     $this->assertEquals('bar', $this->form->last()->id);
 }