diff --git a/Classes/Controller/.gitkeep b/Classes/Controller/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Classes/Controller/TestimonialController.php b/Classes/Controller/TestimonialController.php deleted file mode 100644 index e0c82e4..0000000 --- a/Classes/Controller/TestimonialController.php +++ /dev/null @@ -1,64 +0,0 @@ - - */ -class TestimonialController extends ActionController -{ - /** - * @var \OliverKlee\Tea\Domain\Repository\TestimonialRepository - */ - protected $testimonialRepository = null; - - /** - * @param TestimonialRepository $repository - * - * @return void - */ - public function injectTestimonialRepository(TestimonialRepository $repository) - { - $this->testimonialRepository = $repository; - } - - /** - * Lists all testimonials. - * - * @return void - */ - public function indexAction() - { - $this->view->assign('testimonials', $this->testimonialRepository->findAll()); - } - - /** - * @param Testimonial $testimonial - * - * @return void - */ - public function showAction(Testimonial $testimonial) - { - $this->view->assign('testimonial', $testimonial); - } -} diff --git a/Classes/Domain/Model/.gitkeep b/Classes/Domain/Model/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Classes/Domain/Model/Addition.php b/Classes/Domain/Model/Addition.php deleted file mode 100644 index 03712c4..0000000 --- a/Classes/Domain/Model/Addition.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class Addition extends \TYPO3\CMS\Extbase\DomainObject\AbstractValueObject -{ - /** - * @var string - * @validate NotEmpty - */ - protected $title = ''; - - /** - * @return string $title - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @param string $title - * - * @return void - */ - public function setTitle(string $title) - { - $this->title = $title; - } -} diff --git a/Classes/Domain/Model/TeaBeverage.php b/Classes/Domain/Model/TeaBeverage.php deleted file mode 100644 index 805add7..0000000 --- a/Classes/Domain/Model/TeaBeverage.php +++ /dev/null @@ -1,191 +0,0 @@ - - */ -class TeaBeverage extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity -{ - /** - * @var float - */ - protected $size = 0.0; - - /** - * @var \OliverKlee\Tea\Domain\Model\TeaType - * @lazy - */ - protected $type = null; - - /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\OliverKlee\Tea\Domain\Model\Addition> - * @lazy - */ - protected $additions = null; - - /** - * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\OliverKlee\Tea\Domain\Model\Testimonial> - * @lazy - */ - protected $testimonials = null; - - /** - * The constructor. - * - * @return TeaBeverage - */ - public function __construct() - { - $this->initializeStorageObjects(); - } - - /** - * Initializes all ObjectStorage properties. - * - * @return void - */ - protected function initializeStorageObjects() - { - $this->additions = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - $this->testimonials = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); - } - - /** - * @return float $size - */ - public function getSize(): float - { - return $this->size; - } - - /** - * @param float $size - * - * @return void - */ - public function setSize(float $size) - { - $this->size = $size; - } - - /** - * @return TeaType|null $type - */ - public function getType() - { - return $this->type; - } - - /** - * @param TeaType $type - * - * @return void - */ - public function setType(TeaType $type) - { - $this->type = $type; - } - - /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\OliverKlee\Tea\Domain\Model\Addition> $additions - */ - public function getAdditions(): ObjectStorage - { - return $this->additions; - } - - /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $additions - * - * @return void - */ - public function setAdditions(ObjectStorage $additions) - { - $this->additions = $additions; - } - - /** - * Adds an Addition. - * - * @param \OliverKlee\Tea\Domain\Model\Addition $addition - * - * @return void - */ - public function addAddition(Addition $addition) - { - $this->additions->attach($addition); - } - - /** - * Removes an Addition. - * - * @param \OliverKlee\Tea\Domain\Model\Addition $additionToRemove The Addition to be removed - * - * @return void - */ - public function removeAddition(Addition $additionToRemove) - { - $this->additions->detach($additionToRemove); - } - - /** - * @return \TYPO3\CMS\Extbase\Persistence\ObjectStorage<\OliverKlee\Tea\Domain\Model\Testimonial> $testimonials - */ - public function getTestimonials(): ObjectStorage - { - return $this->testimonials; - } - - /** - * @param \TYPO3\CMS\Extbase\Persistence\ObjectStorage $testimonials - * - * @return void - */ - public function setTestimonials(ObjectStorage $testimonials) - { - $this->testimonials = $testimonials; - } - - /** - * Adds an Testimonial. - * - * @param \OliverKlee\Tea\Domain\Model\Testimonial $testimonial - * - * @return void - */ - public function addTestimonial(Testimonial $testimonial) - { - $this->testimonials->attach($testimonial); - } - - /** - * Removes an Testimonial. - * - * @param \OliverKlee\Tea\Domain\Model\Testimonial $testimonialToRemove The Testimonial to be removed - * - * @return void - */ - public function removeTestimonial(Testimonial $testimonialToRemove) - { - $this->testimonials->detach($testimonialToRemove); - } -} diff --git a/Classes/Domain/Model/TeaType.php b/Classes/Domain/Model/TeaType.php deleted file mode 100644 index b682d86..0000000 --- a/Classes/Domain/Model/TeaType.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ -class TeaType extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity -{ - /** - * @var string - * @validate NotEmpty - */ - protected $title = ''; - - /** - * @var bool - */ - protected $caffeinated = false; - - /** - * @return string - */ - public function getTitle(): string - { - return $this->title; - } - - /** - * @param string $title - * - * @return void - */ - public function setTitle(string $title) - { - $this->title = $title; - } - - /** - * @return bool - */ - public function getCaffeinated(): bool - { - return $this->caffeinated; - } - - /** - * @param bool $caffeinated - * - * @return void - */ - public function setCaffeinated(bool $caffeinated) - { - $this->caffeinated = $caffeinated; - } - - /** - * @return bool - */ - public function isCaffeinated(): bool - { - return $this->getCaffeinated(); - } -} diff --git a/Classes/Domain/Model/Testimonial.php b/Classes/Domain/Model/Testimonial.php deleted file mode 100644 index 17d9f34..0000000 --- a/Classes/Domain/Model/Testimonial.php +++ /dev/null @@ -1,94 +0,0 @@ - - */ -class Testimonial extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity -{ - /** - * @var \DateTime - */ - protected $dateOfPosting = null; - - /** - * @var int - */ - protected $numberOfConsumedCups = 0; - - /** - * @var string - */ - protected $text = ''; - - /** - * @return \DateTime|null - */ - public function getDateOfPosting() - { - return $this->dateOfPosting; - } - - /** - * @param \DateTime $dateOfPosting - * - * @return void - */ - public function setDateOfPosting(\DateTime $dateOfPosting) - { - $this->dateOfPosting = $dateOfPosting; - } - - /** - * @return int $numberOfConsumedCups - */ - public function getNumberOfConsumedCups(): int - { - return $this->numberOfConsumedCups; - } - - /** - * @param int $numberOfConsumedCups - * - * @return void - */ - public function setNumberOfConsumedCups(int $numberOfConsumedCups) - { - $this->numberOfConsumedCups = $numberOfConsumedCups; - } - - /** - * @return string - */ - public function getText(): string - { - return $this->text; - } - - /** - * @param string $text - * - * @return void - */ - public function setText(string $text) - { - $this->text = $text; - } -} diff --git a/Classes/Domain/Repository/.gitkeep b/Classes/Domain/Repository/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Classes/Domain/Repository/TeaBeverageRepository.php b/Classes/Domain/Repository/TeaBeverageRepository.php deleted file mode 100644 index 0d2a2b6..0000000 --- a/Classes/Domain/Repository/TeaBeverageRepository.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -class TeaBeverageRepository extends \TYPO3\CMS\Extbase\Persistence\Repository -{ -} diff --git a/Classes/Domain/Repository/TestimonialRepository.php b/Classes/Domain/Repository/TestimonialRepository.php deleted file mode 100644 index ed2cc5b..0000000 --- a/Classes/Domain/Repository/TestimonialRepository.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -class TestimonialRepository extends \TYPO3\CMS\Extbase\Persistence\Repository -{ -} diff --git a/Classes/Utility/FileUtility.php b/Classes/Utility/FileUtility.php deleted file mode 100644 index 27c0f53..0000000 --- a/Classes/Utility/FileUtility.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class FileUtility -{ - /** - * Concatenates the files given as $sourceFilePaths and writes their contents into $targetFilePath. - * - * @param string $targetFilePath - * @param string[] $sourceFilePaths - * - * @return void - * - * @throws \InvalidArgumentException - */ - public function concatenate(string $targetFilePath, array $sourceFilePaths) - { - if ($targetFilePath === '') { - throw new \InvalidArgumentException('$targetFileName must not be empty.', 1445631384); - } - - $concatenatedContents = ''; - foreach ($sourceFilePaths as $sourceFilePath) { - $concatenatedContents .= file_get_contents($sourceFilePath); - } - - file_put_contents($targetFilePath, $concatenatedContents); - } -} diff --git a/Configuration/TCA/.gitkeep b/Configuration/TCA/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Configuration/TCA/tx_tea_domain_model_addition.php b/Configuration/TCA/tx_tea_domain_model_addition.php deleted file mode 100644 index 653d53e..0000000 --- a/Configuration/TCA/tx_tea_domain_model_addition.php +++ /dev/null @@ -1,130 +0,0 @@ - [ - 'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_addition', - 'label' => 'title', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'dividers2tabs' => true, - - 'versioningWS' => 2, - 'versioning_followPages' => true, - - 'origUid' => 't3_origuid', - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'title,', - 'iconfile' => 'EXT:tea/Resources/Public/Icons/tx_tea_domain_model_addition.gif', - ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title', - ], - 'types' => [ - '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'], - ], - 'palettes' => [ - '1' => ['showitem' => ''], - ], - 'columns' => [ - 'sys_language_uid' => [ - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0], - ], - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_tea_domain_model_addition', - 'foreign_table_where' => 'AND tx_tea_domain_model_addition.pid=###CURRENT_PID### AND tx_tea_domain_model_addition.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ], - ], - 'hidden' => [ - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => 1, - 'l10n_mode' => 'mergeIfNotBlank', - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - 'size' => 13, - 'max' => 20, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'range' => [ - 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), - ], - ], - ], - 'endtime' => [ - 'exclude' => 1, - 'l10n_mode' => 'mergeIfNotBlank', - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime', - 'config' => [ - 'type' => 'input', - 'size' => 13, - 'max' => 20, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'range' => [ - 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), - ], - ], - ], - 'title' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_addition.title', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim,required', - ], - ], - ], -]; diff --git a/Configuration/TCA/tx_tea_domain_model_teabeverage.php b/Configuration/TCA/tx_tea_domain_model_teabeverage.php deleted file mode 100644 index 21153c4..0000000 --- a/Configuration/TCA/tx_tea_domain_model_teabeverage.php +++ /dev/null @@ -1,172 +0,0 @@ - [ - 'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_teabeverage', - 'label' => 'size', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'dividers2tabs' => true, - - 'versioningWS' => 2, - 'versioning_followPages' => true, - - 'origUid' => 't3_origuid', - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'size,type,additions,testimonials,', - 'iconfile' => 'EXT:tea/Resources/Public/Icons/tx_tea_domain_model_teabeverage.gif', - ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, size, type, additions, testimonials', - ], - 'types' => [ - '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, size, type, additions, testimonials, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'], - ], - 'palettes' => [ - '1' => ['showitem' => ''], - ], - 'columns' => [ - 'sys_language_uid' => [ - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0], - ], - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_tea_domain_model_teabeverage', - 'foreign_table_where' => 'AND tx_tea_domain_model_teabeverage.pid=###CURRENT_PID### AND tx_tea_domain_model_teabeverage.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ], - ], - 'hidden' => [ - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => 1, - 'l10n_mode' => 'mergeIfNotBlank', - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - 'size' => 13, - 'max' => 20, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'range' => [ - 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), - ], - ], - ], - 'endtime' => [ - 'exclude' => 1, - 'l10n_mode' => 'mergeIfNotBlank', - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime', - 'config' => [ - 'type' => 'input', - 'size' => 13, - 'max' => 20, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'range' => [ - 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), - ], - ], - ], - 'size' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_teabeverage.size', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'double2', - ], - ], - 'type' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_teabeverage.type', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'tx_tea_domain_model_teatype', - 'minitems' => 0, - 'maxitems' => 1, - ], - ], - 'additions' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_teabeverage.additions', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingleBox', - 'foreign_table' => 'tx_tea_domain_model_addition', - 'MM' => 'tx_tea_teabeverage_addition_mm', - 'size' => 10, - 'autoSizeMax' => 30, - 'maxitems' => 9999, - 'multiple' => 0, - ], - ], - 'testimonials' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_teabeverage.testimonials', - 'config' => [ - 'type' => 'inline', - 'foreign_table' => 'tx_tea_domain_model_testimonial', - 'foreign_field' => 'teabeverage', - 'maxitems' => 9999, - 'appearance' => [ - 'collapseAll' => 0, - 'levelLinksPosition' => 'top', - 'showSynchronizationLink' => 1, - 'showPossibleLocalizationRecords' => 1, - 'showAllLocalizationLink' => 1, - ], - ], - ], - ], -]; diff --git a/Configuration/TCA/tx_tea_domain_model_teatype.php b/Configuration/TCA/tx_tea_domain_model_teatype.php deleted file mode 100644 index 2a5289c..0000000 --- a/Configuration/TCA/tx_tea_domain_model_teatype.php +++ /dev/null @@ -1,138 +0,0 @@ - [ - 'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_teatype', - 'label' => 'title', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'dividers2tabs' => true, - - 'versioningWS' => 2, - 'versioning_followPages' => true, - - 'origUid' => 't3_origuid', - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'title,caffeinated,', - 'iconfile' => 'EXT:tea/Resources/Public/Icons/tx_tea_domain_model_teatype.gif', - ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, title, caffeinated', - ], - 'types' => [ - '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden title, caffeinated, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'], - ], - 'palettes' => [ - '1' => ['showitem' => ''], - ], - 'columns' => [ - 'sys_language_uid' => [ - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0], - ], - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_tea_domain_model_teatype', - 'foreign_table_where' => 'AND tx_tea_domain_model_teatype.pid=###CURRENT_PID### AND tx_tea_domain_model_teatype.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ], - ], - 'hidden' => [ - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => 1, - 'l10n_mode' => 'mergeIfNotBlank', - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - 'size' => 13, - 'max' => 20, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'range' => [ - 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), - ], - ], - ], - 'endtime' => [ - 'exclude' => 1, - 'l10n_mode' => 'mergeIfNotBlank', - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime', - 'config' => [ - 'type' => 'input', - 'size' => 13, - 'max' => 20, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'range' => [ - 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), - ], - ], - ], - 'title' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_teatype.title', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'eval' => 'trim,required', - ], - ], - 'caffeinated' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_teatype.caffeinated', - 'config' => [ - 'type' => 'check', - 'default' => 0, - ], - ], - ], -]; diff --git a/Configuration/TCA/tx_tea_domain_model_testimonial.php b/Configuration/TCA/tx_tea_domain_model_testimonial.php deleted file mode 100644 index f8533f8..0000000 --- a/Configuration/TCA/tx_tea_domain_model_testimonial.php +++ /dev/null @@ -1,156 +0,0 @@ - [ - 'title' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_testimonial', - 'label' => 'date_of_posting', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'cruser_id' => 'cruser_id', - 'dividers2tabs' => true, - - 'versioningWS' => 2, - 'versioning_followPages' => true, - - 'origUid' => 't3_origuid', - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l10n_parent', - 'transOrigDiffSourceField' => 'l10n_diffsource', - - 'delete' => 'deleted', - 'enablecolumns' => [ - 'disabled' => 'hidden', - 'starttime' => 'starttime', - 'endtime' => 'endtime', - ], - 'searchFields' => 'date_of_posting,number_of_consumed_cups,text,', - 'iconfile' => 'EXT:tea/Resources/Public/Icons/tx_tea_domain_model_testimonial.gif', - ], - 'interface' => [ - 'showRecordFieldList' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date_of_posting, number_of_consumed_cups, text', - ], - 'types' => [ - '1' => ['showitem' => 'sys_language_uid, l10n_parent, l10n_diffsource, hidden, date_of_posting, number_of_consumed_cups, text, --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access, starttime, endtime'], - ], - 'palettes' => [ - '1' => ['showitem' => ''], - ], - 'columns' => [ - 'sys_language_uid' => [ - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.language', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'foreign_table' => 'sys_language', - 'foreign_table_where' => 'ORDER BY sys_language.title', - 'items' => [ - ['LLL:EXT:lang/locallang_general.xlf:LGL.allLanguages', -1], - ['LLL:EXT:lang/locallang_general.xlf:LGL.default_value', 0], - ], - ], - ], - 'l10n_parent' => [ - 'displayCond' => 'FIELD:sys_language_uid:>:0', - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.l18n_parent', - 'config' => [ - 'type' => 'select', - 'renderType' => 'selectSingle', - 'items' => [ - ['', 0], - ], - 'foreign_table' => 'tx_tea_domain_model_testimonial', - 'foreign_table_where' => 'AND tx_tea_domain_model_testimonial.pid=###CURRENT_PID### AND tx_tea_domain_model_testimonial.sys_language_uid IN (-1,0)', - ], - ], - 'l10n_diffsource' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - 't3ver_label' => [ - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.versionLabel', - 'config' => [ - 'type' => 'input', - 'size' => 30, - 'max' => 255, - ], - ], - 'hidden' => [ - 'exclude' => 1, - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.hidden', - 'config' => [ - 'type' => 'check', - ], - ], - 'starttime' => [ - 'exclude' => 1, - 'l10n_mode' => 'mergeIfNotBlank', - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.starttime', - 'config' => [ - 'type' => 'input', - 'size' => 13, - 'max' => 20, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'range' => [ - 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), - ], - ], - ], - 'endtime' => [ - 'exclude' => 1, - 'l10n_mode' => 'mergeIfNotBlank', - 'label' => 'LLL:EXT:lang/locallang_general.xlf:LGL.endtime', - 'config' => [ - 'type' => 'input', - 'size' => 13, - 'max' => 20, - 'eval' => 'datetime', - 'checkbox' => 0, - 'default' => 0, - 'range' => [ - 'lower' => mktime(0, 0, 0, date('m'), date('d'), date('Y')), - ], - ], - ], - 'date_of_posting' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_testimonial.date_of_posting', - 'config' => [ - 'type' => 'input', - 'size' => 12, - 'eval' => 'datetime', - 'checkbox' => '0', - 'default' => '0', - ], - ], - 'number_of_consumed_cups' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_testimonial.number_of_consumed_cups', - 'config' => [ - 'type' => 'input', - 'size' => 4, - 'eval' => 'int', - ], - ], - 'text' => [ - 'exclude' => 0, - 'label' => 'LLL:EXT:tea/Resources/Private/Language/locallang_db.xlf:tx_tea_domain_model_testimonial.text', - 'config' => [ - 'type' => 'text', - 'cols' => 40, - 'rows' => 15, - 'eval' => 'trim', - ], - ], - 'teabeverage' => [ - 'config' => [ - 'type' => 'passthrough', - ], - ], - ], -]; diff --git a/Configuration/TypoScript/.gitkeep b/Configuration/TypoScript/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Configuration/TypoScript/constants.txt b/Configuration/TypoScript/constants.txt deleted file mode 100644 index c02a67c..0000000 --- a/Configuration/TypoScript/constants.txt +++ /dev/null @@ -1,21 +0,0 @@ -plugin.tx_tea { - view { - # cat=plugin.tx_tea/file; type=string; label=Path to template root (FE) - templateRootPath = EXT:tea/Resources/Private/Templates/ - # cat=plugin.tx_tea/file; type=string; label=Path to template partials (FE) - partialRootPath = EXT:tea/Resources/Private/Partials/ - # cat=plugin.tx_tea/file; type=string; label=Path to template layouts (FE) - layoutRootPath = EXT:tea/Resources/Private/Layouts/ - } - - persistence { - # cat=plugin.tx_tea//a; type=string; label=Default storage PID - storagePid = - # cat=plugin.tx_tea//a; type=int; label=UID of the page/folder where all new records will be created - newRecordStoragePid = - } - - settings { - - } -} \ No newline at end of file diff --git a/Configuration/TypoScript/setup.txt b/Configuration/TypoScript/setup.txt deleted file mode 100644 index 2496d4e..0000000 --- a/Configuration/TypoScript/setup.txt +++ /dev/null @@ -1,15 +0,0 @@ -plugin.tx_tea { - view { - templateRootPath = {$plugin.tx_tea.view.templateRootPath} - partialRootPath = {$plugin.tx_tea.view.partialRootPath} - layoutRootPath = {$plugin.tx_tea.view.layoutRootPath} - } - - persistence { - storagePid = {$plugin.tx_tea.persistence.storagePid} - } - - features { - rewrittenPropertyMapper = 1 - } -} \ No newline at end of file diff --git a/Resources/Private/Language/.gitkeep b/Resources/Private/Language/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Resources/Private/Language/de.locallang.xlf b/Resources/Private/Language/de.locallang.xlf deleted file mode 100644 index 6962970..0000000 --- a/Resources/Private/Language/de.locallang.xlf +++ /dev/null @@ -1,20 +0,0 @@ - - - -
- - - This is what our satisfied customers have to say: - Das sagen unsere zufriedenen Kunden: - - - %1$u cups on - %1$u Tassen am - - - Y-m-d H:i - d.m.Y H:i - - - - \ No newline at end of file diff --git a/Resources/Private/Language/locallang.xlf b/Resources/Private/Language/locallang.xlf deleted file mode 100644 index 185a51c..0000000 --- a/Resources/Private/Language/locallang.xlf +++ /dev/null @@ -1,17 +0,0 @@ - - - -
- - - This is what our satisfied customers have to say: - - - %1$u cups on - - - Y-m-d H:i - - - - \ No newline at end of file diff --git a/Resources/Private/Language/locallang_csh_tx_tea_domain_model_addition.xlf b/Resources/Private/Language/locallang_csh_tx_tea_domain_model_addition.xlf deleted file mode 100644 index b0dd4f2..0000000 --- a/Resources/Private/Language/locallang_csh_tx_tea_domain_model_addition.xlf +++ /dev/null @@ -1,11 +0,0 @@ - - - -
- - - title - - - - \ No newline at end of file diff --git a/Resources/Private/Language/locallang_csh_tx_tea_domain_model_teabeverage.xlf b/Resources/Private/Language/locallang_csh_tx_tea_domain_model_teabeverage.xlf deleted file mode 100644 index 21a6460..0000000 --- a/Resources/Private/Language/locallang_csh_tx_tea_domain_model_teabeverage.xlf +++ /dev/null @@ -1,20 +0,0 @@ - - - -
- - - size - - - type - - - additions - - - testimonials - - - - \ No newline at end of file diff --git a/Resources/Private/Language/locallang_csh_tx_tea_domain_model_teatype.xlf b/Resources/Private/Language/locallang_csh_tx_tea_domain_model_teatype.xlf deleted file mode 100644 index 0ddeecf..0000000 --- a/Resources/Private/Language/locallang_csh_tx_tea_domain_model_teatype.xlf +++ /dev/null @@ -1,14 +0,0 @@ - - - -
- - - title - - - caffeinated - - - - \ No newline at end of file diff --git a/Resources/Private/Language/locallang_csh_tx_tea_domain_model_testimonial.xlf b/Resources/Private/Language/locallang_csh_tx_tea_domain_model_testimonial.xlf deleted file mode 100644 index b7a7621..0000000 --- a/Resources/Private/Language/locallang_csh_tx_tea_domain_model_testimonial.xlf +++ /dev/null @@ -1,17 +0,0 @@ - - - -
- - - date of posting - - - number of consumed cups - - - text - - - - \ No newline at end of file diff --git a/Resources/Private/Language/locallang_db.xlf b/Resources/Private/Language/locallang_db.xlf deleted file mode 100644 index 9fdd331..0000000 --- a/Resources/Private/Language/locallang_db.xlf +++ /dev/null @@ -1,50 +0,0 @@ - - - -
- - - Tea Beverage - - - Size - - - Type - - - Additions - - - Testimonials - - - Tea Type - - - Title - - - Caffeinated - - - Addition - - - Title - - - Testimonial - - - Date Of Posting - - - Number Of Consumed Cups - - - Text - - - - \ No newline at end of file diff --git a/Resources/Private/Layouts/.gitkeep b/Resources/Private/Layouts/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Resources/Private/Layouts/Default.html b/Resources/Private/Layouts/Default.html deleted file mode 100644 index 2b76734..0000000 --- a/Resources/Private/Layouts/Default.html +++ /dev/null @@ -1,3 +0,0 @@ -
- -
\ No newline at end of file diff --git a/Resources/Private/Partials/.gitkeep b/Resources/Private/Partials/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Resources/Private/Templates/.gitkeep b/Resources/Private/Templates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Resources/Private/Templates/Testimonial/Index.html b/Resources/Private/Templates/Testimonial/Index.html deleted file mode 100644 index 6be85d8..0000000 --- a/Resources/Private/Templates/Testimonial/Index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - -

- -

- - - - - {testimonial.dateOfPosting} - -

-
-
\ No newline at end of file diff --git a/Resources/Private/Templates/Testimonial/Show.html b/Resources/Private/Templates/Testimonial/Show.html deleted file mode 100644 index 1e666a8..0000000 --- a/Resources/Private/Templates/Testimonial/Show.html +++ /dev/null @@ -1,13 +0,0 @@ - - - -

- - - - {testimonial.dateOfPosting} -

- - {testimonial.text} - -
\ No newline at end of file diff --git a/Resources/Public/CSS/.gitkeep b/Resources/Public/CSS/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Resources/Public/Icons/.gitkeep b/Resources/Public/Icons/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Resources/Public/Icons/relation.gif b/Resources/Public/Icons/relation.gif deleted file mode 100644 index db61d7e..0000000 Binary files a/Resources/Public/Icons/relation.gif and /dev/null differ diff --git a/Resources/Public/Icons/tx_tea_domain_model_addition.gif b/Resources/Public/Icons/tx_tea_domain_model_addition.gif deleted file mode 100644 index cbe435a..0000000 Binary files a/Resources/Public/Icons/tx_tea_domain_model_addition.gif and /dev/null differ diff --git a/Resources/Public/Icons/tx_tea_domain_model_teabeverage.gif b/Resources/Public/Icons/tx_tea_domain_model_teabeverage.gif deleted file mode 100644 index 6cc5f16..0000000 Binary files a/Resources/Public/Icons/tx_tea_domain_model_teabeverage.gif and /dev/null differ diff --git a/Resources/Public/Icons/tx_tea_domain_model_teatype.gif b/Resources/Public/Icons/tx_tea_domain_model_teatype.gif deleted file mode 100644 index 37ba37b..0000000 Binary files a/Resources/Public/Icons/tx_tea_domain_model_teatype.gif and /dev/null differ diff --git a/Resources/Public/Icons/tx_tea_domain_model_testimonial.gif b/Resources/Public/Icons/tx_tea_domain_model_testimonial.gif deleted file mode 100644 index 6cc5f16..0000000 Binary files a/Resources/Public/Icons/tx_tea_domain_model_testimonial.gif and /dev/null differ diff --git a/Resources/Public/JavaScript/.gitkeep b/Resources/Public/JavaScript/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Tests/Functional/.gitkeep b/Tests/Functional/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Tests/Functional/Domain/Repository/Fixtures/TeaBeverages.xml b/Tests/Functional/Domain/Repository/Fixtures/TeaBeverages.xml deleted file mode 100644 index 29887f0..0000000 --- a/Tests/Functional/Domain/Repository/Fixtures/TeaBeverages.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - 1 - 3.141 - - \ No newline at end of file diff --git a/Tests/Functional/Domain/Repository/Fixtures/Testimonials.xml b/Tests/Functional/Domain/Repository/Fixtures/Testimonials.xml deleted file mode 100644 index 2c89fb0..0000000 --- a/Tests/Functional/Domain/Repository/Fixtures/Testimonials.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - 1 - A very good Early Grey! - - \ No newline at end of file diff --git a/Tests/Functional/Domain/Repository/TeaBeverageRepositoryTest.php b/Tests/Functional/Domain/Repository/TeaBeverageRepositoryTest.php deleted file mode 100644 index 9650cf6..0000000 --- a/Tests/Functional/Domain/Repository/TeaBeverageRepositoryTest.php +++ /dev/null @@ -1,95 +0,0 @@ - - */ -class TeaBeverageRepositoryTest extends \Nimut\TestingFramework\TestCase\FunctionalTestCase -{ - /** - * @var string[] - */ - protected $testExtensionsToLoad = ['typo3conf/ext/tea']; - - /** - * @var TeaBeverageRepository|\PHPUnit_Framework_MockObject_MockObject - */ - protected $subject = null; - - protected function setUp() - { - parent::setUp(); - - /** @var ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - // We are using the object manager instead of new so that the dependencies get injected. - // In a unit test, we would inject the mocked dependencies instead. - $this->subject = $objectManager->get(TeaBeverageRepository::class); - } - - /** - * @test - */ - public function findAllForNoRecordsReturnsEmptyContainer() - { - $container = $this->subject->findAll(); - - self::assertCount(0, $container); - } - - /** - * @test - */ - public function findAllWithOneRecordFindsThisRecord() - { - $this->importDataSet(__DIR__ . '/Fixtures/TeaBeverages.xml'); - - $container = $this->subject->findAll(); - /** @var TeaBeverage $first */ - $first = $container->getFirst(); - - self::assertCount(1, $container); - self::assertSame(1, $first->getUid()); - } - - /** - * @test - */ - public function findByUidForExistingRecordReturnsModelWithData() - { - $this->importDataSet(__DIR__ . '/Fixtures/TeaBeverages.xml'); - - /** @var TeaBeverage $model */ - $model = $this->subject->findByUid(1); - - self::assertNotNull($model); - self::assertEquals( - 3.141, - $model->getSize(), - '', - 0.001 - ); - } -} diff --git a/Tests/Functional/Domain/Repository/TestimonialRepositoryTest.php b/Tests/Functional/Domain/Repository/TestimonialRepositoryTest.php deleted file mode 100644 index c4772d7..0000000 --- a/Tests/Functional/Domain/Repository/TestimonialRepositoryTest.php +++ /dev/null @@ -1,93 +0,0 @@ - - */ -class TestimonialRepositoryTest extends \Nimut\TestingFramework\TestCase\FunctionalTestCase -{ - /** - * @var string[] - */ - protected $testExtensionsToLoad = ['typo3conf/ext/tea']; - - /** - * @var TestimonialRepository - */ - protected $subject = null; - - protected function setUp() - { - parent::setUp(); - - /** @var ObjectManager $objectManager */ - $objectManager = GeneralUtility::makeInstance(ObjectManager::class); - // We are using the object manager instead of new so that the dependencies get injected. - // In a unit test, we would inject the mocked dependencies instead. - $this->subject = $objectManager->get(TestimonialRepository::class); - } - - /** - * @test - */ - public function findAllForNoRecordsReturnsEmptyContainer() - { - $container = $this->subject->findAll(); - - self::assertCount(0, $container); - } - - /** - * @test - */ - public function findAllWithOneRecordFindsThisRecord() - { - $this->importDataSet(__DIR__ . '/Fixtures/Testimonials.xml'); - $uid = 1; - - $container = $this->subject->findAll(); - /** @var Testimonial $first */ - $first = $container->getFirst(); - - self::assertCount(1, $container); - self::assertSame($uid, $first->getUid()); - } - - /** - * @test - */ - public function findByUidForExistingRecordReturnsModelWithData() - { - $this->importDataSet(__DIR__ . '/Fixtures/Testimonials.xml'); - $uid = 1; - - /** @var Testimonial $model */ - $model = $this->subject->findByUid($uid); - - self::assertNotNull($model); - $text = 'A very good Early Grey!'; - self::assertSame($text, $model->getText()); - } -} diff --git a/Tests/Functional/Utility/FileUtilityTest.php b/Tests/Functional/Utility/FileUtilityTest.php deleted file mode 100644 index bf95bd0..0000000 --- a/Tests/Functional/Utility/FileUtilityTest.php +++ /dev/null @@ -1,133 +0,0 @@ - - */ -class FileUtilityTest extends \Nimut\TestingFramework\TestCase\FunctionalTestCase -{ - /** - * @var string[] - */ - protected $testExtensionsToLoad = ['typo3conf/ext/tea']; - - /** - * @var \OliverKlee\Tea\Utility\FileUtility - */ - protected $subject = null; - - /** - * @var vfsStreamDirectory - */ - protected $root = null; - - /** @var string */ - protected $rootDirectoryName = 'home'; - - /** - * @var string - */ - protected $targetFilePath = ''; - - protected function setUp() - { - parent::setUp(); - - $this->root = vfsStream::setup('home'); - $this->targetFilePath = vfsStream::url('home/target.txt'); - - $this->subject = new \OliverKlee\Tea\Utility\FileUtility(); - } - - /** - * @test - */ - public function concatenateWithEmptyTargetFileNameThrowsException() - { - $this->expectException(\InvalidArgumentException::class); - - $this->subject->concatenate('', ['foo.txt']); - } - - /** - * @test - */ - public function concatenateWithNoSourceFilesCreatesEmptyTargetFile() - { - $this->subject->concatenate($this->targetFilePath, []); - - self::assertSame('', file_get_contents($this->targetFilePath)); - } - - /** - * @test - */ - public function concatenateWithOneEmptySourceFileCreatesEmptyTargetFile() - { - // This is one way to create a file with contents, using PHP's file functions. - $sourceFileName = vfsStream::url('home/source.txt'); - // Just calling vfsStream::url does not create the file yet. We need to write into it to create it. - file_put_contents($sourceFileName, ''); - - $this->subject->concatenate($this->targetFilePath, [$sourceFileName]); - - self::assertSame('', file_get_contents($this->targetFilePath)); - } - - /** - * @test - */ - public function concatenateWithOneFileCopiesContentsFromSourceFileToTargetFile() - { - // This is vfsStream's way of creating a file with contents. - $contents = 'Hello world!'; - $sourceFileName = vfsStream::url('home/source.txt'); - vfsStream::newFile('source.txt')->at($this->root)->setContent($contents); - - $this->subject->concatenate($this->targetFilePath, [$sourceFileName]); - - self::assertSame($contents, file_get_contents($this->targetFilePath)); - } - - /** - * @test - */ - public function concatenateWithTwoFileCopiesContentsFromBothFilesInOrderToTargetFile() - { - $contents1 = 'Hello '; - $sourceFileName1 = vfsStream::url('home/source1.txt'); - file_put_contents($sourceFileName1, $contents1); - $contents2 = 'world!'; - $sourceFileName2 = vfsStream::url('home/source2.txt'); - file_put_contents($sourceFileName2, $contents2); - - $this->subject->concatenate( - $this->targetFilePath, - [$sourceFileName1, $sourceFileName2] - ); - - self::assertStringEqualsFile( - $this->targetFilePath, $contents1 . $contents2 - ); - } -} diff --git a/Tests/Unit/.gitkeep b/Tests/Unit/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Tests/Unit/Controller/TestimonialControllerTest.php b/Tests/Unit/Controller/TestimonialControllerTest.php deleted file mode 100644 index 92d9b27..0000000 --- a/Tests/Unit/Controller/TestimonialControllerTest.php +++ /dev/null @@ -1,96 +0,0 @@ - - */ -class TestimonialControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var TestimonialController - */ - protected $subject = null; - - /** - * @var ViewInterface|ObjectProphecy - */ - protected $viewProphecy = null; - - /** - * @var ViewInterface|ProphecySubjectInterface - */ - protected $view = null; - - /** - * @var TestimonialRepository|ObjectProphecy - */ - protected $testimonialRepositoryProphecy = null; - - /** - * @var TestimonialRepository|ProphecySubjectInterface - */ - protected $testimonialRepository = null; - - protected function setUp() - { - $this->subject = new TestimonialController(); - - $this->viewProphecy = $this->prophesize(ViewInterface::class); - $this->view = $this->viewProphecy->reveal(); - $this->inject($this->subject, 'view', $this->view); - - $this->testimonialRepositoryProphecy = $this->prophesize(TestimonialRepository::class); - $this->testimonialRepository = $this->testimonialRepositoryProphecy->reveal(); - $this->subject->injectTestimonialRepository($this->testimonialRepository); - } - - /** - * @test - */ - public function indexActionCanBeCalled() - { - $this->subject->indexAction(); - } - - /** - * @test - */ - public function indexActionPassesAllTestimonialsAsTestimonialsToView() - { - $allTestimonials = new ObjectStorage(); - $this->testimonialRepositoryProphecy->findAll()->willReturn($allTestimonials); - - $this->viewProphecy->assign('testimonials', $allTestimonials)->shouldBeCalled(); - - $this->subject->indexAction(); - } -} diff --git a/Tests/Unit/Domain/Model/AdditionTest.php b/Tests/Unit/Domain/Model/AdditionTest.php deleted file mode 100644 index eb891df..0000000 --- a/Tests/Unit/Domain/Model/AdditionTest.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ -class AdditionTest extends \Nimut\TestingFramework\TestCase\UnitTestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var \OliverKlee\Tea\Domain\Model\Addition - */ - protected $subject = null; - - protected function setUp() - { - $this->subject = new \OliverKlee\Tea\Domain\Model\Addition(); - } - - /** - * @test - */ - public function getTitleInitiallyReturnsEmptyString() - { - self::assertSame('', $this->subject->getTitle()); - } - - /** - * @test - */ - public function setTitleSetsTitle() - { - $title = 'foo bar'; - - $this->subject->setTitle($title); - - self::assertSame($title, $this->subject->getTitle()); - } -} diff --git a/Tests/Unit/Domain/Model/TeaBeverageTest.php b/Tests/Unit/Domain/Model/TeaBeverageTest.php deleted file mode 100644 index 1409b39..0000000 --- a/Tests/Unit/Domain/Model/TeaBeverageTest.php +++ /dev/null @@ -1,205 +0,0 @@ - - */ -class TeaBeverageTest extends \Nimut\TestingFramework\TestCase\UnitTestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var \OliverKlee\Tea\Domain\Model\TeaBeverage - */ - protected $subject = null; - - protected function setUp() - { - $this->subject = new \OliverKlee\Tea\Domain\Model\TeaBeverage(); - } - - /** - * @test - */ - public function getSizeInitiallyReturnsZero() - { - self::assertSame( - 0.0, - $this->subject->getSize() - ); - } - - /** - * @test - */ - public function setSizeSetsSize() - { - $size = 1234.56; - - $this->subject->setSize($size); - - self::assertSame($size, $this->subject->getSize()); - } - - /** - * @test - */ - public function getTypeInitiallyReturnsNull() - { - self::assertNull( - $this->subject->getType() - ); - } - - /** - * @test - */ - public function setTypeSetsType() - { - $type = new \OliverKlee\Tea\Domain\Model\TeaType(); - $this->subject->setType($type); - - self::assertSame( - $type, - $this->subject->getType() - ); - } - - /** - * @test - */ - public function getAdditionsInitiallyReturnsEmptyStorage() - { - self::assertEquals( - new ObjectStorage(), - $this->subject->getAdditions() - ); - } - - /** - * @test - */ - public function setAdditionsSetsAdditions() - { - $items = new ObjectStorage(); - $this->subject->setAdditions($items); - - self::assertSame( - $items, - $this->subject->getAdditions() - ); - } - - /** - * @test - */ - public function addAdditionAddsAddition() - { - $items = new ObjectStorage(); - $this->subject->setAdditions($items); - - $newItem = new \OliverKlee\Tea\Domain\Model\Addition(); - $this->subject->addAddition($newItem); - - self::assertTrue( - $this->subject->getAdditions()->contains($newItem) - ); - } - - /** - * @test - */ - public function removeAdditionRemovesAddition() - { - $items = new ObjectStorage(); - $this->subject->setAdditions($items); - - $newItem = new \OliverKlee\Tea\Domain\Model\Addition(); - $this->subject->addAddition($newItem); - $this->subject->removeAddition($newItem); - - self::assertFalse( - $this->subject->getAdditions()->contains($newItem) - ); - } - - /** - * @test - */ - public function getTestimonialsInitiallyReturnsEmptyStorage() - { - self::assertEquals( - new ObjectStorage(), - $this->subject->getTestimonials() - ); - } - - /** - * @test - */ - public function setTestimonialsSetsTestimonials() - { - $items = new ObjectStorage(); - $this->subject->setTestimonials($items); - - self::assertSame( - $items, - $this->subject->getTestimonials() - ); - } - - /** - * @test - */ - public function addTestimonialAddsTestimonial() - { - $items = new ObjectStorage(); - $this->subject->setTestimonials($items); - - $newItem = new \OliverKlee\Tea\Domain\Model\Testimonial(); - $this->subject->addTestimonial($newItem); - - self::assertTrue( - $this->subject->getTestimonials()->contains($newItem) - ); - } - - /** - * @test - */ - public function removeTestimonialRemovesTestimonial() - { - $items = new ObjectStorage(); - $this->subject->setTestimonials($items); - - $newItem = new \OliverKlee\Tea\Domain\Model\Testimonial(); - $this->subject->addTestimonial($newItem); - $this->subject->removeTestimonial($newItem); - - self::assertFalse( - $this->subject->getTestimonials()->contains($newItem) - ); - } -} diff --git a/Tests/Unit/Domain/Model/TeaTypeTest.php b/Tests/Unit/Domain/Model/TeaTypeTest.php deleted file mode 100644 index dba6b53..0000000 --- a/Tests/Unit/Domain/Model/TeaTypeTest.php +++ /dev/null @@ -1,78 +0,0 @@ - - */ -class TeaTypeTest extends \Nimut\TestingFramework\TestCase\UnitTestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var \OliverKlee\Tea\Domain\Model\TeaType - */ - protected $subject = null; - - protected function setUp() - { - $this->subject = new \OliverKlee\Tea\Domain\Model\TeaType(); - } - - /** - * @test - */ - public function getTitleInitiallyReturnsEmptyString() - { - self::assertSame('', $this->subject->getTitle()); - } - - /** - * @test - */ - public function setTitleSetsTitle() - { - $title = 'foo bar'; - - $this->subject->setTitle($title); - - self::assertSame($title, $this->subject->getTitle()); - } - - /** - * @test - */ - public function getCaffeinatedInitiallyReturnsFalse() - { - self::assertFalse($this->subject->getCaffeinated()); - } - - /** - * @test - */ - public function setCaffeinatedSetsCaffeinated() - { - $this->subject->setCaffeinated(true); - - self::assertTrue($this->subject->getCaffeinated()); - } -} diff --git a/Tests/Unit/Domain/Model/TestimonialTest.php b/Tests/Unit/Domain/Model/TestimonialTest.php deleted file mode 100644 index 01241dc..0000000 --- a/Tests/Unit/Domain/Model/TestimonialTest.php +++ /dev/null @@ -1,102 +0,0 @@ - - */ -class TestimonialTest extends \Nimut\TestingFramework\TestCase\UnitTestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var \OliverKlee\Tea\Domain\Model\Testimonial - */ - protected $subject = null; - - protected function setUp() - { - $this->subject = new \OliverKlee\Tea\Domain\Model\Testimonial(); - } - - /** - * @test - */ - public function getDateOfPostingInitiallyReturnsNull() - { - self::assertNull($this->subject->getDateOfPosting()); - } - - /** - * @test - */ - public function setDateOfPostingSetsDateOfPosting() - { - $date = new \DateTime(); - $this->subject->setDateOfPosting($date); - - self::assertSame( - $date, - $this->subject->getDateOfPosting() - ); - } - - /** - * @test - */ - public function getNumberOfConsumedCupsInitiallyReturnsZero() - { - self::assertSame(0, $this->subject->getNumberOfConsumedCups()); - } - - /** - * @test - */ - public function setNumberOfConsumedCupsSetsNumberOfConsumedCups() - { - $number = 123456; - - $this->subject->setNumberOfConsumedCups($number); - - self::assertSame($number, $this->subject->getNumberOfConsumedCups()); - } - - /** - * @test - */ - public function getTextInitiallyReturnsEmptyString() - { - self::assertSame('', $this->subject->getText()); - } - - /** - * @test - */ - public function setTextSetsText() - { - $text = 'foo bar'; - - $this->subject->setText($text); - - self::assertSame($text, $this->subject->getText()); - } -} diff --git a/Tests/Unit/Domain/Repository/TeaBeverageRepositoryTest.php b/Tests/Unit/Domain/Repository/TeaBeverageRepositoryTest.php deleted file mode 100644 index 5353a60..0000000 --- a/Tests/Unit/Domain/Repository/TeaBeverageRepositoryTest.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ -class TeaBeverageRepositoryTest extends \Nimut\TestingFramework\TestCase\UnitTestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var TeaBeverageRepository - */ - protected $subject; - - /** - * @var ObjectManagerInterface|ProphecySubjectInterface - */ - protected $objectManager = null; - - protected function setUp() - { - $objectManagerProphecy = $this->prophesize(ObjectManagerInterface::class); - $this->objectManager = $objectManagerProphecy->reveal(); - $this->subject = new TeaBeverageRepository($this->objectManager); - } - - /** - * @test - */ - public function isRepository() - { - self::assertInstanceOf(Repository::class, $this->subject); - } -} diff --git a/Tests/Unit/Domain/Repository/TestimonialRepositoryTest.php b/Tests/Unit/Domain/Repository/TestimonialRepositoryTest.php deleted file mode 100644 index b1729da..0000000 --- a/Tests/Unit/Domain/Repository/TestimonialRepositoryTest.php +++ /dev/null @@ -1,60 +0,0 @@ - - */ -class TestimonialRepositoryTest extends \Nimut\TestingFramework\TestCase\UnitTestCase -{ - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var TestimonialRepository - */ - protected $subject; - - /** - * @var ObjectManagerInterface|ProphecySubjectInterface - */ - protected $objectManager = null; - - protected function setUp() - { - $objectManagerProphecy = $this->prophesize(ObjectManagerInterface::class); - $this->objectManager = $objectManagerProphecy->reveal(); - $this->subject = new TestimonialRepository($this->objectManager); - } - - /** - * @test - */ - public function isRepository() - { - self::assertInstanceOf(Repository::class, $this->subject); - } -} diff --git a/ext_icon.gif b/ext_icon.gif deleted file mode 100644 index 1a832d4..0000000 Binary files a/ext_icon.gif and /dev/null differ diff --git a/ext_localconf.php b/ext_localconf.php deleted file mode 100644 index 3070352..0000000 --- a/ext_localconf.php +++ /dev/null @@ -1,15 +0,0 @@ - 'index,show', - ], - // non-cacheable actions - [ - 'Testimonial' => '', - ] -); diff --git a/ext_tables.php b/ext_tables.php deleted file mode 100644 index 8f0e50e..0000000 --- a/ext_tables.php +++ /dev/null @@ -1,22 +0,0 @@ -