You are here

public function FocalPointManagerTest::testAbsoluteToRelative in Focal Point 8

Absolute to relative.

@covers ::absoluteToRelative

@dataProvider providerCoordinates

File

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

Class

FocalPointManagerTest
@coversDefaultClass \Drupal\focal_point\FocalPointManager

Namespace

Drupal\Tests\focal_point\Unit

Code

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