Unsere Auswahl an erlesenen Tees
diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf
index 4d8a893..4102e7a 100644
--- a/Resources/Private/Language/locallang.xlf
+++ b/Resources/Private/Language/locallang.xlf
@@ -12,6 +12,9 @@
+
+
+
diff --git a/Resources/Private/Templates/Tea/Index.html b/Resources/Private/Templates/Tea/Index.html
index 327b61b..84d6364 100644
--- a/Resources/Private/Templates/Tea/Index.html
+++ b/Resources/Private/Templates/Tea/Index.html
@@ -15,7 +15,9 @@
{tea.uid}
- {tea.title}
+
+ {tea.title}
+
|
diff --git a/Resources/Private/Templates/Tea/Show.html b/Resources/Private/Templates/Tea/Show.html
new file mode 100644
index 0000000..490e4b2
--- /dev/null
+++ b/Resources/Private/Templates/Tea/Show.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+ {tea.title}
+
+
+ {tea.description -> f:format.html()}
+
+
diff --git a/Tests/Functional/Controller/Fixtures/Database/pages.xml b/Tests/Functional/Controller/Fixtures/Database/pages.xml
index efc9631..c0b3668 100644
--- a/Tests/Functional/Controller/Fixtures/Database/pages.xml
+++ b/Tests/Functional/Controller/Fixtures/Database/pages.xml
@@ -3,7 +3,7 @@
1
0
- Root
+ Tea list
1
15
@@ -27,4 +27,31 @@
]]>
+
+ 2
+ 1
+ Tea single view
+ 1
+ 15
+
+
+ 2
+ 2
+ list
+ tea_tea
+
+
+
+
+
+
+ Tea->show
+
+
+
+
+
+ ]]>
+
diff --git a/Tests/Functional/Controller/Fixtures/Frontend/Basic.typoscript b/Tests/Functional/Controller/Fixtures/Frontend/Basic.typoscript
index be86e8f..8457ad3 100644
--- a/Tests/Functional/Controller/Fixtures/Frontend/Basic.typoscript
+++ b/Tests/Functional/Controller/Fixtures/Frontend/Basic.typoscript
@@ -52,3 +52,9 @@ page {
file = EXT:tea/Tests/Functional/Controller/Fixtures/Frontend/Template.html
}
}
+
+plugin.tx_tea {
+ settings {
+ singleViewPageUid = 2
+ }
+}
diff --git a/Tests/Unit/Controller/TeaControllerTest.php b/Tests/Unit/Controller/TeaControllerTest.php
index ced6a3f..05e1add 100644
--- a/Tests/Unit/Controller/TeaControllerTest.php
+++ b/Tests/Unit/Controller/TeaControllerTest.php
@@ -4,6 +4,7 @@ namespace OliverKlee\Tea\Tests\Unit\Controller;
use Nimut\TestingFramework\TestCase\UnitTestCase;
use OliverKlee\Tea\Controller\TeaController;
+use OliverKlee\Tea\Domain\Model\Product\Tea;
use OliverKlee\Tea\Domain\Repository\Product\TeaRepository;
use Prophecy\Prophecy\ObjectProphecy;
use Prophecy\Prophecy\ProphecySubjectInterface;
@@ -75,4 +76,15 @@ class TeaControllerTest extends UnitTestCase
$this->subject->indexAction();
}
+
+ /**
+ * @test
+ */
+ public function showActionAssignsPassedTeaAsTeaToView()
+ {
+ $tea = new Tea();
+ $this->viewProphecy->assign('tea', $tea)->shouldBeCalled();
+
+ $this->subject->showAction($tea);
+ }
}
diff --git a/ext_localconf.php b/ext_localconf.php
index 777cb67..749e7fe 100644
--- a/ext_localconf.php
+++ b/ext_localconf.php
@@ -7,7 +7,7 @@
'Tea',
// all actions
[
- 'Tea' => 'index',
+ 'Tea' => 'index, show',
],
// non-cacheable actions
[