Skip to content

Commit

Permalink
[binary] remove __toString method
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Jan 8, 2014
1 parent 27b53dd commit ee70a73
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 23 deletions.
7 changes: 0 additions & 7 deletions Binary/BinaryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,4 @@ public function getMimeType();
* @return string
*/
public function getFormat();

/**
* It must return same result as self::getContent method.
*
* @return string
*/
public function __toString();
}
8 changes: 0 additions & 8 deletions Model/Binary.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,4 @@ public function getFormat()
{
return $this->format;
}

/**
* @return string
*/
public function __toString()
{
return (string) $this->getContent();
}
}
1 change: 0 additions & 1 deletion Tests/Imagine/Data/DataManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Liip\ImagineBundle\Imagine\Data\DataManager;
use Liip\ImagineBundle\Imagine\Data\Loader\LoaderInterface;
use Liip\ImagineBundle\Binary\MimeTypeGuesserInterface;
use Liip\ImagineBundle\Model\Binary;
use Liip\ImagineBundle\Tests\AbstractTest;
use Symfony\Component\HttpFoundation\Request;
Expand Down
7 changes: 0 additions & 7 deletions Tests/Model/BinaryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ public function testAllowGetContentSetInConstructor()
$this->assertEquals('theContent', $image->getContent());
}

public function testShouldReturnContentWhenBinaryConvertedToString()
{
$image = new Binary('theContent', 'image/png', 'png');

$this->assertEquals('theContent', (string) $image);
}

public function testAllowGetMimeTypeSetInConstructor()
{
$image = new Binary('aContent', 'image/png', 'png');
Expand Down

0 comments on commit ee70a73

Please sign in to comment.