ScssPhpCompiler example

use Shopware\Storefront\Theme\ScssPhpCompiler;

/** * @internal * * @covers \Shopware\Storefront\Theme\ScssPhpCompiler */
class ScssPhpCompilerTest extends TestCase
{
    public function testCompilesEmptyConfig(): void
    {
        $scssCompiler = new ScssPhpCompiler();

        $compiled = $scssCompiler->compileString(
            new CompilerConfiguration([]),
            '$background: #123456; background-color: $background;'
        );

        static::assertEquals('background-color: #123456; ', preg_replace('/\r?\n$/', ' ', $compiled)$compiled);
    }

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