getTestImage example

->willReturn($this->toolkitOperation);

    $this->image = new Image($this->toolkit, $this->source);

    return $this->image;
  }

  /** * Tests \Drupal\Core\Image\Image::getHeight(). */
  public function testGetHeight() {
    $this->getTestImage(FALSE);
    $this->assertEquals(100, $this->image->getHeight());
  }

  /** * Tests \Drupal\Core\Image\Image::getWidth(). */
  public function testGetWidth() {
    $this->getTestImage(FALSE);
    $this->assertEquals(88, $this->image->getWidth());
  }

  
Home | Imprint | This part of the site doesn't use cookies.