ColorThief\VBox::copy PHP Method

copy() public method

public copy ( )
    public function copy()
    {
        return new VBox($this->r1, $this->r2, $this->g1, $this->g2, $this->b1, $this->b2, $this->histo);
    }

Usage Example

Example #1
0
 /**
  * @covers ColorThief\VBox::copy
  */
 public function testCopy()
 {
     $this->vbox->histo = array(25 => 8);
     $copy = $this->vbox->copy();
     $this->assertInstanceOf('ColorThief\\VBox', $copy);
     $this->assertSame($this->vbox->r1, $copy->r1);
     $this->assertSame($this->vbox->r2, $copy->r2);
     $this->assertSame($this->vbox->g1, $copy->g1);
     $this->assertSame($this->vbox->g2, $copy->g2);
     $this->assertSame($this->vbox->b1, $copy->b1);
     $this->assertSame($this->vbox->b2, $copy->b2);
     $this->assertSame($this->vbox->histo, $copy->histo);
 }
All Usage Examples Of ColorThief\VBox::copy