for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
class GridFieldLinkButtonTest extends SapphireTest
You can fix this by adding a namespace to your class:
namespace YourVendor; class YourClass { }
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.
{
/**
* Not very strong test, as it relies on template output.
*/
public function testCorrectLinkIsContained()
$button = new GridFieldLinkButton('https://addons.silverstripe.org', 'test');
$output = $button->getHTMLFragments(null);
$this->assertContains('https://addons.silverstripe.org', $output['test']);
}
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.