Skip to content

Commit

Permalink
added rotate() to storage
Browse files Browse the repository at this point in the history
  • Loading branch information
rostenkowski committed May 8, 2016
1 parent 3fc3691 commit 7adfb0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/Storage.rotate.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ $storage = new ImageStorage($storeDir, $cacheDir);

// test: rotate
$meta = new ImageEntity();

$storage->add(new ImageFile(__DIR__ . '/sample-images/sample-landscape.jpg'), $meta);

Assert::true($storage->contains($meta));
Assert::equal(1, Finder::findDirectories('*')->in($storeDir)->count());
Assert::equal('e97c1cb54b3312f503825474cea49589e4cc3b5d', $meta->getHash());

$storage->rotate($meta);

Assert::true($storage->contains($meta));
Assert::equal(2, Finder::findDirectories('*')->in($storeDir)->count());
$rotatedImageHash = 'b4d8d1e46333e42b4ede050da2d12552eb78335a';
Assert::equal($rotatedImageHash, $meta->getHash());

// wipeout testing directories
exec(sprintf('rm -rf %s', escapeshellarg($storeDir)));
Expand Down

0 comments on commit 7adfb0d

Please sign in to comment.