You are here

public function FocalPointManagerTest::testRelativeToAbsolute in Focal Point 8

Relative to Absolute.

@covers ::relativeToAbsolute

@dataProvider providerCoordinates

File

tests/src/Unit/FocalPointManagerTest.php, line 78

Class

FocalPointManagerTest
@coversDefaultClass \Drupal\focal_point\FocalPointManager

Namespace

Drupal\Tests\focal_point\Unit

Code

public function testRelativeToAbsolute($relative, $size, $absolute) {
  $this
    ->assertEquals($absolute, $this->focalPointManager
    ->relativeToAbsolute($relative['x'], $relative['y'], $size['width'], $size['height']));
}