AuthorFilter example

use Shopware\Core\Framework\Log\Package;
use Shopware\Core\System\Snippet\Filter\AuthorFilter;

/** * @internal */
#[Package('system-settings')] class AuthorFilterTest extends TestCase
{
    public function testGetFilterName(): void
    {
        static::assertSame('author', (new AuthorFilter())->getName());
    }

    public function testSupports(): void
    {
        static::assertTrue((new AuthorFilter())->supports('author'));
        static::assertFalse((new AuthorFilter())->supports(''));
        static::assertFalse((new AuthorFilter())->supports('test'));
    }

    public function testFilter(): void
    {
        
Home | Imprint | This part of the site doesn't use cookies.