| 1 | <?php |
||
| 5 | use Dynamic\ShortUR\Model\ShortURL; |
||
| 6 | use SilverStripe\Dev\SapphireTest; |
||
| 7 | |||
| 8 | class ShortURLTest extends SapphireTest |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var array |
||
| 12 | */ |
||
| 13 | protected static $fixture_file = [ |
||
| 14 | '../fixtures.yml', |
||
| 15 | ]; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * |
||
| 19 | */ |
||
| 20 | public function testGetCMSFields() |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * |
||
| 29 | */ |
||
| 30 | public function testGetValidate() |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * |
||
| 50 | */ |
||
| 51 | function testGetLongURL() |
||
| 52 | { |
||
| 53 | $object = $this->objFromFixture(ShortURL::class, 'one'); |
||
| 54 | $expected = $object->URL . '?utm_source=' . $object->CampaignSource; |
||
| 55 | $this->assertEquals($expected, $object->getLongURL()); |
||
| 57 | } |