From 5f92ee4ea09927b0576b18adca35e9b92b5cabe5 Mon Sep 17 00:00:00 2001 From: uwetews Date: Sat, 19 Nov 2016 07:50:24 +0100 Subject: [PATCH] delete wrong test --- .../X_Issues/Issuse312/Include.phpxxx | 125 ------------------ .../X_Issues/Issuse312/InheritanceTest.php | 92 ------------- .../X_Issues/Issuse312/cache/dummy.txt | 0 .../Issuse312/templates/034_child.tpl | 1 - .../Issuse312/templates/034_parent.tpl | 1 - .../X_Issues/Issuse312/templates_c/dummy.txt | 0 6 files changed, 219 deletions(-) delete mode 100644 tests/UnitTests/X_Issues/Issuse312/Include.phpxxx delete mode 100644 tests/UnitTests/X_Issues/Issuse312/InheritanceTest.php delete mode 100644 tests/UnitTests/X_Issues/Issuse312/cache/dummy.txt delete mode 100644 tests/UnitTests/X_Issues/Issuse312/templates/034_child.tpl delete mode 100644 tests/UnitTests/X_Issues/Issuse312/templates/034_parent.tpl delete mode 100644 tests/UnitTests/X_Issues/Issuse312/templates_c/dummy.txt diff --git a/tests/UnitTests/X_Issues/Issuse312/Include.phpxxx b/tests/UnitTests/X_Issues/Issuse312/Include.phpxxx deleted file mode 100644 index b8e2546e..00000000 --- a/tests/UnitTests/X_Issues/Issuse312/Include.phpxxx +++ /dev/null @@ -1,125 +0,0 @@ -')) { - - class Base - { - const TEMPLATE = '034_parent.tpl'; - - public $id = null; - - public function __construct($id) - { - $this->id = $id; - } - - public function getHTML() - { - return static::class; - } - } - - class Child extends Base - { - const TEMPLATE = '034_child.tpl'; - - public function getText() - { - return $this->getHTML(); - } - } - - class BaseClone extends Base - { - - } - - /* - * @requires PHP 5.5 - */ - - class InheritanceTest extends PHPUnit_Framework_TestCase - { - protected $smarty; - - protected function setUp() - { - chdir(dirname(__FILE__)); - $this->smarty = new Smarty(); - $this->smarty->setTemplateDir('./templates'); - $this->smarty->setCompileDir('./templates_c'); - $this->smarty->setCacheDir('./cache'); - $this->smarty->caching = false; - } - - /** - * @dataProvider providerInheritance - * @requires PHP5.5 - */ - public function testInheritance($elements, $assertions) - { - foreach ($elements as $nr => $element) { - $this->smarty->assign('e', $element); - $this->assertSame($assertions[ $nr ], $this->smarty->fetch($element::TEMPLATE)); - } - } - - /** - * @dataProvider providerInheritance - */ - public function testInheritanceCaching($elements, $assertions) - { - $this->smarty->caching = true; - foreach ($elements as $nr => $element) { - $this->smarty->assign('e', $element); - $this->assertSame($assertions[ $nr ], $this->smarty->fetch($element::TEMPLATE)); - } - } - - /** - * @dataProvider providerInheritance - */ - public function testInheritanceCaching1($elements, $assertions) - { - $this->smarty->caching = true; - foreach ($elements as $nr => $element) { - $this->smarty->assign('e', $element); - $stat = $this->smarty->isCached($element::TEMPLATE); - $this->assertSame($assertions[ $nr ], $this->smarty->fetch($element::TEMPLATE)); - $this->assertTrue($stat); - } - } - - public function providerInheritance() - { - return [[//(#0) This test works as expected - [new Base(1), new Base(2), new BaseClone(3),], ['1 Base', '2 Base', '3 BaseClone',],], - [//(#1) This test works as expected - [new Child(1), new BaseClone(2), //This output is right(!) - ], ['1 Child', '2 BaseClone',],], [//(#2) This test fails - [new Child(1), new Child(2), new BaseClone(3),], - ['1 Child', '2 Child', '3 BaseClone', - //Here the output is "2 Child" - ],], [//(#3) This test fails - [new Child(1), new BaseClone(2), new Child(3),], - ['1 Child', '2 BaseClone', '3 Child', - //Here the output is "2 Child" - ],], [//(#4) This test fails - [new Child(1), new Child(2), new BaseClone(3), - new Child(4),], - ['1 Child', '2 Child', '3 BaseClone', - //Here the output is also "2 Child" - '4 Child',],], [//(#5) This test fails - [new BaseClone(1), new Child(2), - new Child(3), new BaseClone(4),], - ['1 BaseClone', - //This output is right(!) - '2 Child', '3 Child', - '4 BaseClone', - //Here the output is "3 Child" - ],],]; - } - } -} \ No newline at end of file diff --git a/tests/UnitTests/X_Issues/Issuse312/InheritanceTest.php b/tests/UnitTests/X_Issues/Issuse312/InheritanceTest.php deleted file mode 100644 index 948375ad..00000000 --- a/tests/UnitTests/X_Issues/Issuse312/InheritanceTest.php +++ /dev/null @@ -1,92 +0,0 @@ -')) { - include 'include.phpxxx'; - } - /* - * @requires PHP 5.5 - */ - - class InheritanceTest extends PHPUnit_Framework_TestCase - { - protected $smarty; - - protected function setUp() - { - chdir(dirname(__FILE__)); - $this->smarty = new Smarty(); - $this->smarty->setTemplateDir('./templates'); - $this->smarty->setCompileDir('./templates_c'); - $this->smarty->setCacheDir('./cache'); - $this->smarty->caching = false; - } - - /** - * @dataProvider providerInheritance - * @requires PHP5.5 - */ - public function testInheritance($elements, $assertions) - { - foreach ($elements as $nr => $element) { - $this->smarty->assign('e', $element); - $this->assertSame($assertions[ $nr ], $this->smarty->fetch($element::TEMPLATE)); - } - } - - /** - * @dataProvider providerInheritance - */ - public function testInheritanceCaching($elements, $assertions) - { - $this->smarty->caching = true; - foreach ($elements as $nr => $element) { - $this->smarty->assign('e', $element); - $this->assertSame($assertions[ $nr ], $this->smarty->fetch($element::TEMPLATE)); - } - } - - /** - * @dataProvider providerInheritance - */ - public function testInheritanceCaching1($elements, $assertions) - { - $this->smarty->caching = true; - foreach ($elements as $nr => $element) { - $this->smarty->assign('e', $element); - $stat = $this->smarty->isCached($element::TEMPLATE); - $this->assertSame($assertions[ $nr ], $this->smarty->fetch($element::TEMPLATE)); - $this->assertTrue($stat); - } - } - - public function providerInheritance() - { - return [[//(#0) This test works as expected - [new Base(1), new Base(2), new BaseClone(3),], ['1 Base', '2 Base', '3 BaseClone',],], - [//(#1) This test works as expected - [new Child(1), new BaseClone(2), //This output is right(!) - ], ['1 Child', '2 BaseClone',],], [//(#2) This test fails - [new Child(1), new Child(2), new BaseClone(3),], - ['1 Child', '2 Child', '3 BaseClone', - //Here the output is "2 Child" - ],], [//(#3) This test fails - [new Child(1), new BaseClone(2), new Child(3),], - ['1 Child', '2 BaseClone', '3 Child', - //Here the output is "2 Child" - ],], [//(#4) This test fails - [new Child(1), new Child(2), new BaseClone(3), - new Child(4),], - ['1 Child', '2 Child', '3 BaseClone', - //Here the output is also "2 Child" - '4 Child',],], [//(#5) This test fails - [new BaseClone(1), new Child(2), - new Child(3), new BaseClone(4),], - ['1 BaseClone', - //This output is right(!) - '2 Child', '3 Child', - '4 BaseClone', - //Here the output is "3 Child" - ],],]; - } - } diff --git a/tests/UnitTests/X_Issues/Issuse312/cache/dummy.txt b/tests/UnitTests/X_Issues/Issuse312/cache/dummy.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/UnitTests/X_Issues/Issuse312/templates/034_child.tpl b/tests/UnitTests/X_Issues/Issuse312/templates/034_child.tpl deleted file mode 100644 index 37608871..00000000 --- a/tests/UnitTests/X_Issues/Issuse312/templates/034_child.tpl +++ /dev/null @@ -1 +0,0 @@ -{extends '034_parent.tpl'}{block name=elementContent}{$e->getText() nocache}{/block} \ No newline at end of file diff --git a/tests/UnitTests/X_Issues/Issuse312/templates/034_parent.tpl b/tests/UnitTests/X_Issues/Issuse312/templates/034_parent.tpl deleted file mode 100644 index 390bf05c..00000000 --- a/tests/UnitTests/X_Issues/Issuse312/templates/034_parent.tpl +++ /dev/null @@ -1 +0,0 @@ -{$e->id nocache} {block name=elementContent}{$e->getHTML() nocache}{/block} \ No newline at end of file diff --git a/tests/UnitTests/X_Issues/Issuse312/templates_c/dummy.txt b/tests/UnitTests/X_Issues/Issuse312/templates_c/dummy.txt deleted file mode 100644 index e69de29b..00000000