Source of file AbstractLinkObjectTest.php
Size: 0,855 Bytes - Last Modified: 2021-03-22T10:12:55+00:00
/var/www/docs.ssmods.com/process/src/tests/AbstractLinkObjectTest.php
1234567891011121314151617181920212223242526272829 | <?php namespace Education\StandardFooter\Tests; use SilverStripe\Dev\SapphireTest; use Education\StandardFooter\Model\AbstractLinkObject; use SilverStripe\Forms\FieldList; class AbstractLinkObjectTest extends SapphireTest { protected static $fixture_file = 'fixtures.yml'; public function testGetCMSFields() { $link = $this->objFromFixture(AbstractLinkObject::class, 'internal'); $this->assertInstanceOf(FieldList::class, $link->getCMSFields()); } public function testGetLink() { $internal = $this->objFromFixture(AbstractLinkObject::class, 'internal'); $this->assertEquals('/test-page/', $internal->Link()->getValue()); $external = $this->objFromFixture(AbstractLinkObject::class, 'external'); $this->assertEquals('http://google.com', $external->Link()->getValue()); } } |