first commit
This commit is contained in:
commit
e81864e683
2984 files changed
+267797
No files matched your search
+20
@@ -0,0 +1,20 @@
|
||||
// Variables
|
||||
$radius: 1rem;
|
||||
$preCalculatedRadius: $radius / 2;
|
||||
|
||||
// Tests
|
||||
.case-without-variable {
|
||||
border-radius: 1rem / 2;
|
||||
}
|
||||
.case-with-variable {
|
||||
border-radius: $radius / 2;
|
||||
}
|
||||
.case-precalculated-variable {
|
||||
border-radius: $preCalculatedRadius / 2;
|
||||
}
|
||||
|
||||
$width: 1rem;
|
||||
button {
|
||||
width: $width / 2;
|
||||
border-radius: $width / 2;
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
.case-without-variable {
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
.case-with-variable {
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
.case-precalculated-variable {
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
button {
|
||||
width: 0.5rem;
|
||||
border-radius: 0.5rem;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the package bk2k/bootstrap-package.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace BK2K\BootstrapPackage\Tests\Unit\Compiler;
|
||||
|
||||
use ScssPhp\ScssPhp\Compiler;
|
||||
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
|
||||
|
||||
/**
|
||||
* Testcase for class \ScssPhp\ScssPhp\Compiler
|
||||
*/
|
||||
class ScssCompilerTest extends UnitTestCase
|
||||
{
|
||||
/**
|
||||
* @param string $file
|
||||
* @param string $expectedResultFile
|
||||
* @dataProvider compileDataProvider
|
||||
* @test
|
||||
*/
|
||||
public function compile(string $file, string $expectedResultFile): void
|
||||
{
|
||||
$scss = new Compiler();
|
||||
$resultCss = $scss->compileString((string) file_get_contents(__DIR__ . '/' . $file), $file)->getCss();
|
||||
$expectedCss = file_get_contents(__DIR__ . '/' . $expectedResultFile);
|
||||
self::assertSame($expectedCss, $resultCss);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function compileDataProvider(): array
|
||||
{
|
||||
return [
|
||||
'Calculation' => [
|
||||
'Fixtures/Calculation/Input.scss',
|
||||
'Fixtures/Calculation/Output.css'
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the package bk2k/bootstrap-package.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace BK2K\BootstrapPackage\Tests\Unit\Utility;
|
||||
|
||||
use BK2K\BootstrapPackage\Utility\ExternalMediaUtility;
|
||||
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
|
||||
|
||||
/**
|
||||
* Testcase for class \BK2K\BootstrapPackage\Utility\ExternalMediaUtility
|
||||
*/
|
||||
class ExternalMediaUtilityTest extends UnitTestCase
|
||||
{
|
||||
/**
|
||||
* @param string $url
|
||||
* @param string $class
|
||||
* @param string $expectedResult
|
||||
* @dataProvider getEmbedCodeDataProvider
|
||||
* @test
|
||||
*/
|
||||
public function getEmbedCode(string $url, string $class, $expectedResult): void
|
||||
{
|
||||
self::assertSame($expectedResult, (new ExternalMediaUtility())->getEmbedCode($url, $class));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getEmbedCodeDataProvider(): array
|
||||
{
|
||||
return [
|
||||
'empty' => ['', '', null],
|
||||
'www.youtube.com' => ['https://www.youtube.com/watch?v=zpOVYePk6mM', '', '<iframe src="https://www.youtube-nocookie.com/embed/zpOVYePk6mM" frameborder="0" allowfullscreen></iframe>'],
|
||||
'youtube.com' => ['https://youtube.com/watch?v=zpOVYePk6mM', '', '<iframe src="https://www.youtube-nocookie.com/embed/zpOVYePk6mM" frameborder="0" allowfullscreen></iframe>'],
|
||||
'www.youtu.be' => ['https://www.youtu.be/zpOVYePk6mM', '', '<iframe src="https://www.youtube-nocookie.com/embed/zpOVYePk6mM" frameborder="0" allowfullscreen></iframe>'],
|
||||
'youtu.de' => ['https://youtu.be/zpOVYePk6mM', '', '<iframe src="https://www.youtube-nocookie.com/embed/zpOVYePk6mM" frameborder="0" allowfullscreen></iframe>'],
|
||||
'vimeo' => ['https://vimeo.com/143018597', '', '<iframe src="https://player.vimeo.com/video/143018597" frameborder="0" allowfullscreen></iframe>'],
|
||||
'www.youtube.com with class' => ['https://www.youtube.com/watch?v=zpOVYePk6mM', 'test', '<iframe class="test" src="https://www.youtube-nocookie.com/embed/zpOVYePk6mM" frameborder="0" allowfullscreen></iframe>'],
|
||||
'youtube.com with class' => ['https://youtube.com/watch?v=zpOVYePk6mM', 'test', '<iframe class="test" src="https://www.youtube-nocookie.com/embed/zpOVYePk6mM" frameborder="0" allowfullscreen></iframe>'],
|
||||
'www.youtu.be with class' => ['https://www.youtu.be/zpOVYePk6mM', 'test', '<iframe class="test" src="https://www.youtube-nocookie.com/embed/zpOVYePk6mM" frameborder="0" allowfullscreen></iframe>'],
|
||||
'youtu.de with class' => ['https://youtu.be/zpOVYePk6mM', 'test', '<iframe class="test" src="https://www.youtube-nocookie.com/embed/zpOVYePk6mM" frameborder="0" allowfullscreen></iframe>'],
|
||||
'vimeo with class' => ['https://vimeo.com/143018597', 'test', '<iframe class="test" src="https://player.vimeo.com/video/143018597" frameborder="0" allowfullscreen></iframe>'],
|
||||
];
|
||||
}
|
||||
}
|
||||
+1061
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user