From fedc1270574cf722d9d7462534e0a7c11b03d3b7 Mon Sep 17 00:00:00 2001 From: Simon Wisselink Date: Sat, 16 Jan 2021 23:01:15 +0100 Subject: [PATCH] Mark tests that use sleep calls as slow, so we can ignore them when running unit tests in development --- .../_shared/CacheResourceTestCommon.php | 6 +++++- .../ResourceTests/Extends/ExtendsResourceTest.php | 4 ++-- .../TagTests/BockExtend/CompileBlockExtendsTest.php | 8 +++++--- .../TemplateSource/TagTests/Insert/CompileInsertTest.php | 1 + .../ValueTests/SmartySpecialVars/Now/SmartyNowTest.php | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/UnitTests/CacheResourceTests/_shared/CacheResourceTestCommon.php b/tests/UnitTests/CacheResourceTests/_shared/CacheResourceTestCommon.php index 7deaebd2..129fb6ba 100644 --- a/tests/UnitTests/CacheResourceTests/_shared/CacheResourceTestCommon.php +++ b/tests/UnitTests/CacheResourceTests/_shared/CacheResourceTestCommon.php @@ -339,6 +339,10 @@ class CacheResourceTestCommon extends PHPUnit_Smarty $this->assertNull($tpl->cached->handler->getCachedContent($tpl3)); $this->assertEquals('hello world', $tpl->cached->handler->getCachedContent($tpl4)); } + + /** + * @group slow + */ public function testClearCacheExpired() { $this->smarty->caching = true; @@ -399,7 +403,7 @@ class CacheResourceTestCommon extends PHPUnit_Smarty * @runInSeparateProcess * @preserveGlobalState disabled * @dataProvider data - * + * @group slow */ public function testCache($lockTime, $lockTimeout, $compile_id, $cache_id, $isCached, $tmin, $tmax, $forceCompile, $forceCache, $update, $testNumber, $compileTestNumber, $renderTestNumber, $testName) { diff --git a/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php b/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php index 3012f34f..06fe239a 100644 --- a/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php +++ b/tests/UnitTests/ResourceTests/Extends/ExtendsResourceTest.php @@ -125,7 +125,7 @@ class ExtendsResourceTest extends PHPUnit_Smarty * test grandchild/child/parent dependency test2 * @runInSeparateProcess * @preserveGlobalState disabled - * + * @group slow */ public function testCompileBlockGrandChildMustCompile_021_2() { @@ -193,7 +193,7 @@ class ExtendsResourceTest extends PHPUnit_Smarty * test grandchild/child/parent dependency test4 * @runInSeparateProcess * @preserveGlobalState disabled - * + * @group slow */ public function testCompileBlockGrandChildMustCompile_021_4() { diff --git a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php index 0f3eb406..0fb1cbe0 100644 --- a/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/BockExtend/CompileBlockExtendsTest.php @@ -610,7 +610,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty * * @runInSeparateProcess * @preserveGlobalState disabled - * + * @group slow */ public function testCompileBlockGrandChildMustCompile_021_2() { @@ -645,7 +645,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty * * @runInSeparateProcess * @preserveGlobalState disabled - * + * @group slow */ public function testCompileBlockGrandChildMustCompile_021_3() { @@ -670,7 +670,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty * * @runInSeparateProcess * @preserveGlobalState disabled - * + * @group slow */ public function testCompileBlockGrandChildMustCompile_021_32() { @@ -692,6 +692,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty * * @runInSeparateProcess * @preserveGlobalState disabled + * @group slow */ public function testCompileBlockGrandChildMustCompile_021_4() { @@ -716,6 +717,7 @@ class CompileBlockExtendsTest extends PHPUnit_Smarty * * @runInSeparateProcess * @preserveGlobalState disabled + * @group slow */ public function testCompileBlockGrandChildMustCompile_021_42() { diff --git a/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php b/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php index 61e8835c..7498d2cf 100644 --- a/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php +++ b/tests/UnitTests/TemplateSource/TagTests/Insert/CompileInsertTest.php @@ -210,6 +210,7 @@ class CompileInsertTest extends PHPUnit_Smarty * test insert plugin caching 2 * @runInSeparateProcess * @preserveGlobalState disabled + * @group slow */ public function testInsertPluginCaching3_2() { diff --git a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php index 724f2bf5..21f4bf26 100644 --- a/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php +++ b/tests/UnitTests/TemplateSource/ValueTests/SmartySpecialVars/Now/SmartyNowTest.php @@ -35,7 +35,7 @@ class SmartyNowTest extends PHPUnit_Smarty } /** * test {$smarty.now nocache} - * + * @group slow */ public function testSmartyNowNocache() { $this->smarty->setCaching(true);