Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Commit

Permalink
Refining tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian Krämer committed Jan 18, 2016
1 parent 2a6cb89 commit 848d5aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/TestCase/Model/Behavior/ImagineBehaviorTest.php
Expand Up @@ -229,7 +229,7 @@ public function testWidenAndHeighten() {
]
);

$result = $this->Model->getImageSize(TMP . 'thumbnail3.jpg');
$result = $this->Model->getImageSize(TMP . 'heighten.jpg');
$this->assertEquals($result, [151, 200, 'x' => 151, 'y' => 200]);
}

Expand All @@ -242,23 +242,23 @@ public function testScale() {
$image = Plugin::path('Burzum/Imagine') . 'tests' . DS . 'Fixture' . DS . 'titus.jpg';

// Scale
$this->Model->processImage($image, TMP . 'thumbnail4.jpg', [], [
$this->Model->processImage($image, TMP . 'scale-factor2.jpg', [], [
'scale' => [
'factor' => 2
]
]);

$result = $this->Model->getImageSize(TMP . 'thumbnail4.jpg');
$result = $this->Model->getImageSize(TMP . 'scale-factor2.jpg');
$this->assertEquals($result, [1000, 1328, 'x' => 1000, 'y' => 1328]);

// Scale2
$this->Model->processImage($image, TMP . 'thumbnail5.jpg', [], [
$this->Model->processImage($image, TMP . 'scale-factor1.25.jpg', [], [
'scale' => [
'factor' => 1.25
]
]);

$result = $this->Model->getImageSize(TMP . 'thumbnail5.jpg');
$result = $this->Model->getImageSize(TMP . 'scale-factor1.25.jpg');
$this->assertEquals($result, [625, 830, 'x' => 625, 'y' => 830]);
}
}

0 comments on commit 848d5aa

Please sign in to comment.