Skip to content

Commit

Permalink
Rename clip parameter from name to path
Browse files Browse the repository at this point in the history
  • Loading branch information
christeredvartsen committed Oct 9, 2017
1 parent 8aed5f6 commit d3038a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Image/Transformation/Clip.php
Expand Up @@ -27,8 +27,8 @@ class Clip extends Transformation {
public function transform(array $params) {
$pathName = null;

if (!empty($params['name'])) {
$pathName = $params['name'];
if (!empty($params['path'])) {
$pathName = $params['path'];

$metadata = $this->event->getDatabase()->getMetadata(
$this->image->getUser(),
Expand Down
6 changes: 3 additions & 3 deletions tests/phpunit/unit/Image/Transformation/ClipTest.php
Expand Up @@ -83,22 +83,22 @@ public function tearDown() {
*
*/
public function testExceptionIfMissingNamedPath() {
$this->transformation->transform(['name' => 'foo']);
$this->transformation->transform(['path' => 'foo']);
}

/**
* @covers ::transform
*/
public function testNoExceptionIfMissingNamedPathButIgnoreSet() {
$this->transformation->transform(['name' => 'foo', 'ignoreUnknownPath' => '']);
$this->transformation->transform(['path' => 'foo', 'ignoreUnknownPath' => '']);
}

/**
* @covers ::transform
*/
public function testTransformationHappensWithMatchingPath() {
$this->image->expects($this->atLeastOnce())->method('hasBeenTransformed')->with(true);
$this->transformation->transform(['name' => 'Panda']);
$this->transformation->transform(['path' => 'Panda']);
}

/**
Expand Down

0 comments on commit d3038a6

Please sign in to comment.