Skip to content

Commit

Permalink
adding test for empty parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jun 1, 2015
1 parent 88a9876 commit 0597557
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to laravel-glide will be documented in this file.

## 2.2.3
- Fixing Issue that would create a invalid signature based on empty get parameters

## 2.2.2
- Moved github repo from freekmurze to spatie

## 2.2.1
- Fixed an issue where the controller would not work when the default namespace is not "App"

Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A Glide Server Provider for Laravel
[![Build status](https://img.shields.io/travis/spatie/laravel-glide.svg)](https://travis-ci.org/spatie/laravel-glide)
[![Latest Version](https://img.shields.io/github/release/spatie/laravel-glide.svg?style=flat-square)](https://github.com/spatie/laravel-glide/releases)
[![Build status](https://img.shields.io/travis/spatie/laravel-glide.svg)](https://travis-ci.org/spatie/laravel-glide)
[![SensioLabsInsight](https://img.shields.io/sensiolabs/i/ad0422ca-e31f-44a3-b01a-ee5ec757b18d.svg)](https://insight.sensiolabs.com/projects/ad0422ca-e31f-44a3-b01a-ee5ec757b18d)
[![Quality Score](https://img.shields.io/scrutinizer/g/spatie/laravel-glide.svg?style=flat-square)](https://scrutinizer-ci.com/g/spatie/laravel-glide)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
Expand Down Expand Up @@ -148,6 +148,14 @@ For the moment Glide doesn't clean the cache directory, but that functionality [
### Other filesystems
Currently this package only supports images stored on the local filesystem. Glide itself leverages [Flysystem](https://github.com/thephpleague/flysystem) to read and write to various filesystems. I'd like support for that in this package let me know or feel free to submit a pull request.

## Testing

You can run the tests with:

```bash
vendor/bin/codecept run
```

## Credits

- [Freek Van der Herten](https:/murze.be)
Expand Down
15 changes: 13 additions & 2 deletions tests/unit/GlideImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function testModificationParameters()
$this->assertAttributeContains($modificationParameters['filt'], 'modificationParameters', $glide);
}

public function testgetURL()
public function testGetURL()
{
$glide = $this->_before();

Expand All @@ -89,7 +89,7 @@ public function testgetURL()
}


public function test_toString()
public function testToString()
{
$glide = $this->_before();

Expand All @@ -99,4 +99,15 @@ public function test_toString()

$this->assertEquals($expectedUrl, $glide->__toString());
}

public function testFiltersEmptyParameters()
{
$glide = $this->_before();

$glide->load('testFile.jpg', ['foo' => '' ]);

$expectedUrl = '/testFile.jpg';

$this->assertEquals($expectedUrl, $glide->__toString());
}
}

0 comments on commit 0597557

Please sign in to comment.