|
@@ 48-56 (lines=9) @@
|
| 45 |
|
parent::tearDown(); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
public function testGetTagWithTitle() { |
| 49 |
|
Config::inst()->update('SilverStripe\Filesystem\Storage\DBFile', 'force_resample', false); |
| 50 |
|
|
| 51 |
|
$image = $this->objFromFixture('Image', 'imageWithTitle'); |
| 52 |
|
$expected = '<img src="/assets/ImageTest/folder/444065542b/test-image.png" alt="This is a image Title" />'; |
| 53 |
|
$actual = trim($image->getTag()); |
| 54 |
|
|
| 55 |
|
$this->assertEquals($expected, $actual); |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
public function testGetTagWithoutTitle() { |
| 59 |
|
Config::inst()->update('SilverStripe\Filesystem\Storage\DBFile', 'force_resample', false); |
|
@@ 58-66 (lines=9) @@
|
| 55 |
|
$this->assertEquals($expected, $actual); |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
public function testGetTagWithoutTitle() { |
| 59 |
|
Config::inst()->update('SilverStripe\Filesystem\Storage\DBFile', 'force_resample', false); |
| 60 |
|
|
| 61 |
|
$image = $this->objFromFixture('Image', 'imageWithoutTitle'); |
| 62 |
|
$expected = '<img src="/assets/ImageTest/folder/444065542b/test-image.png" alt="test image" />'; |
| 63 |
|
$actual = trim($image->getTag()); |
| 64 |
|
|
| 65 |
|
$this->assertEquals($expected, $actual); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
public function testGetTagWithoutTitleContainingDots() { |
| 69 |
|
Config::inst()->update('SilverStripe\Filesystem\Storage\DBFile', 'force_resample', false); |
|
@@ 68-76 (lines=9) @@
|
| 65 |
|
$this->assertEquals($expected, $actual); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
public function testGetTagWithoutTitleContainingDots() { |
| 69 |
|
Config::inst()->update('SilverStripe\Filesystem\Storage\DBFile', 'force_resample', false); |
| 70 |
|
|
| 71 |
|
$image = $this->objFromFixture('Image', 'imageWithoutTitleContainingDots'); |
| 72 |
|
$expected = '<img src="/assets/ImageTest/folder/46affab704/test.image.with.dots.png" alt="test.image.with.dots" />'; |
| 73 |
|
$actual = trim($image->getTag()); |
| 74 |
|
|
| 75 |
|
$this->assertEquals($expected, $actual); |
| 76 |
|
} |
| 77 |
|
|
| 78 |
|
/** |
| 79 |
|
* Tests that multiple image manipulations may be performed on a single Image |