[TASK] Extend FileMount-Model with description-field 86/40386/2
authorDaniel Maier <dani-maier@gmx.de>
Wed, 17 Jun 2015 19:01:14 +0000 (21:01 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 17 Jun 2015 19:16:19 +0000 (21:16 +0200)
The new description-field that was recently added to table sys_filemounts
is now also added to the FileMount-Model.

Resolves: #67581
Related: #59570
Releases: master
Change-Id: I70d174d2bd9b10fe913fb06b713f5899c35f8bf9
Reviewed-on: http://review.typo3.org/40386
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/extbase/Classes/Domain/Model/FileMount.php
typo3/sysext/extbase/Tests/Unit/Domain/Model/FileMountTest.php

index 15dc109..9beaba3 100644 (file)
@@ -30,6 +30,13 @@ class FileMount extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        protected $title = '';
 
        /**
+        * Description of the file mount.
+        *
+        * @var string
+        */
+       protected $description;
+
+       /**
         * Path of the file mount.
         *
         * @var string
@@ -75,6 +82,25 @@ class FileMount extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
        }
 
        /**
+        * Getter for the description of the file mount.
+        *
+        * @return string
+        */
+       public function getDescription() {
+               return $this->description;
+       }
+
+       /**
+        * Setter for the description of the file mount.
+        *
+        * @param string $description
+        * @return void
+        */
+       public function setDescription($description) {
+               $this->description = $description;
+       }
+
+       /**
         * Getter for the path of the file mount.
         *
         * @return string
index 46fbf66..930933e 100644 (file)
@@ -47,6 +47,15 @@ class FileMountTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
        /**
         * @test
         */
+       public function setDescriptionSetsDescription() {
+               $description = 'This is the foobar mount, used for foo and bar';
+               $this->subject->setDescription($description);
+               $this->assertSame($description, $this->subject->getDescription());
+       }
+
+       /**
+        * @test
+        */
        public function getPathInitiallyReturnsEmptyString() {
                $this->assertSame('', $this->subject->getPath());
        }