From f529e4a68831b0b1201bc9d33eb67af463a380d2 Mon Sep 17 00:00:00 2001 From: Oliver Klee Date: Sun, 25 Oct 2015 12:01:33 +0100 Subject: [PATCH] [CLEANUP] Use ::class and imports --- Tests/Unit/Controller/TestimonialControllerTest.php | 6 ++---- .../Domain/Repository/TeaBeverageRepositoryTest.php | 12 +++++++----- .../Domain/Repository/TestimonialRepositoryTest.php | 12 +++++++----- ext_emconf.php | 3 ++- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Tests/Unit/Controller/TestimonialControllerTest.php b/Tests/Unit/Controller/TestimonialControllerTest.php index b30187b..a1ab348 100644 --- a/Tests/Unit/Controller/TestimonialControllerTest.php +++ b/Tests/Unit/Controller/TestimonialControllerTest.php @@ -43,12 +43,10 @@ class TestimonialControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { protected function setUp() { $this->subject = new TestimonialController(); - $this->view = $this->getMock('TYPO3\\CMS\\Extbase\\Mvc\\View\\ViewInterface'); + $this->view = $this->getMock(ViewInterface::class); $this->subject->setView($this->view); - $this->testimonialRepository = $this->getMock( - 'OliverKlee\\Tea\\Domain\\Repository\\TestimonialRepository', array(), array(), '', false - ); + $this->testimonialRepository = $this->getMock(TestimonialRepository::class, array(), array(), '', false); $this->subject->injectTestimonialRepository($this->testimonialRepository); } diff --git a/Tests/Unit/Domain/Repository/TeaBeverageRepositoryTest.php b/Tests/Unit/Domain/Repository/TeaBeverageRepositoryTest.php index 16bb8d3..c3a6d6a 100644 --- a/Tests/Unit/Domain/Repository/TeaBeverageRepositoryTest.php +++ b/Tests/Unit/Domain/Repository/TeaBeverageRepositoryTest.php @@ -14,6 +14,9 @@ namespace OliverKlee\Tea\Tests\Unit\Domain\Repository; * The TYPO3 project - inspiring people to share! */ +use OliverKlee\Tea\Domain\Repository\TeaBeverageRepository; +use TYPO3\CMS\Extbase\Object\ObjectManagerInterface; + /** * Test case. * @@ -21,19 +24,18 @@ namespace OliverKlee\Tea\Tests\Unit\Domain\Repository; */ class TeaBeverageRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { /** - * @var \OliverKlee\Tea\Domain\Model\TeaBeverage + * @var TeaBeverageRepository */ protected $subject; /** - * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManager = null; protected function setUp() { - $this->objectManager = $this->getMock('TYPO3\CMS\Extbase\Object\ObjectManagerInterface'); - - $this->subject = new \OliverKlee\Tea\Domain\Repository\TeaBeverageRepository($this->objectManager); + $this->objectManager = $this->getMock(ObjectManagerInterface::class); + $this->subject = new TeaBeverageRepository($this->objectManager); } /** diff --git a/Tests/Unit/Domain/Repository/TestimonialRepositoryTest.php b/Tests/Unit/Domain/Repository/TestimonialRepositoryTest.php index 8c13cce..37fe5bb 100644 --- a/Tests/Unit/Domain/Repository/TestimonialRepositoryTest.php +++ b/Tests/Unit/Domain/Repository/TestimonialRepositoryTest.php @@ -14,6 +14,9 @@ namespace OliverKlee\Tea\Tests\Unit\Domain\Repository; * The TYPO3 project - inspiring people to share! */ +use TYPO3\CMS\Extbase\Object\ObjectManagerInterface; +use OliverKlee\Tea\Domain\Repository\TestimonialRepository; + /** * Test case. * @@ -21,19 +24,18 @@ namespace OliverKlee\Tea\Tests\Unit\Domain\Repository; */ class TestimonialRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { /** - * @var \OliverKlee\Tea\Domain\Model\Testimonial + * @var TestimonialRepository */ protected $subject; /** - * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject + * @var ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $objectManager = null; protected function setUp() { - $this->objectManager = $this->getMock('TYPO3\CMS\Extbase\Object\ObjectManagerInterface'); - - $this->subject = new \OliverKlee\Tea\Domain\Repository\TestimonialRepository($this->objectManager); + $this->objectManager = $this->getMock(ObjectManagerInterface::class); + $this->subject = new TestimonialRepository($this->objectManager); } /** diff --git a/ext_emconf.php b/ext_emconf.php index 94af831..ec24159 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -30,9 +30,10 @@ $EM_CONF[$_EXTKEY] = array( 'version' => '0.0.1', 'constraints' => array( 'depends' => array( + 'php' => '5.5.0-7.0.99', + 'typo3' => '6.2.0-7.0.99', 'extbase' => '6.2.0-7.0.99', 'fluid' => '6.2.0-7.0.99', - 'typo3' => '6.2.0-7.0.99', 'phpunit' => '4.0.0-5.9.99', ), 'conflicts' => array(