mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
33 lines
738 B
PHP
33 lines
738 B
PHP
<?php
|
|
|
|
namespace SilverStripe\View\Tests\AttributesHTMLTest;
|
|
|
|
use SilverStripe\View\AttributesHTML;
|
|
use SilverStripe\Dev\TestOnly;
|
|
|
|
/**
|
|
* This call is used to test the AttributesHTML trait
|
|
*/
|
|
class DummyAttributesHTML implements TestOnly
|
|
{
|
|
use AttributesHTML;
|
|
|
|
private array $defaultAttributes = [];
|
|
|
|
/**
|
|
* Trait requires this method to prepopulate the attributes
|
|
*/
|
|
protected function getDefaultAttributes(): array
|
|
{
|
|
return $this->defaultAttributes;
|
|
}
|
|
|
|
/**
|
|
* This method is only there to allow to explicitly set the default attributes in the test.
|
|
*/
|
|
public function setDefaultAttributes(array $attributes): void
|
|
{
|
|
$this->defaultAttributes = $attributes;
|
|
}
|
|
}
|