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