Skip to content

Commit

Permalink
test that output path is optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiproping committed Apr 1, 2018
1 parent 446cfb8 commit 1b6437b
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions tests/Pslayers/PslayersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,50 @@ public function testMasterRender()

// $instance->render();
}

//Output path was not really optional
public function testOptionalOutputPath()
{
$width = 830;
$height = 360;

$config = [
'id' => 11,
'width' => $width,
'height' => $height,
];

$instance = new Pslayers($config);

// background layer
$backgroundLayer = new SolidLayer([
'id' => 'master-layer-solid-base',
'width' => $width,
'height' => $height,
'opacity' => 1.0,
'positionX' => 0,
'positionY' => 0,
'composite' => Imagick::COMPOSITE_DEFAULT,
'colour' => '#0F0',
]);

$instance->addLayer($backgroundLayer, 0);

// gradient layer
$gradientLayer = new GradientLayer([
'id' => 'master-layer-gradient',
'width' => $width,
'height' => $height / 2,
'opacity' => 0.9,
'positionX' => 0,
'positionY' => 0,
'composite' => Imagick::COMPOSITE_OVER,
'startColour' => '#F00',
'endColour' => 'transparent',
]);

$instance->addLayer($backgroundLayer, 0);
$instance->addLayer($gradientLayer, 1);
$instance->render();
}
}

0 comments on commit 1b6437b

Please sign in to comment.