mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-09 23:56:14 +01:00

[CLEANUP] Use ::class and imports

This commit is contained in:
Oliver Klee 2015-10-25 12:01:33 +01:00
parent ee8a8f903c
commit f529e4a688
4 changed files with 18 additions and 15 deletions

View file

@ -43,12 +43,10 @@ class TestimonialControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
protected function setUp() { protected function setUp() {
$this->subject = new TestimonialController(); $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->subject->setView($this->view);
$this->testimonialRepository = $this->getMock( $this->testimonialRepository = $this->getMock(TestimonialRepository::class, array(), array(), '', false);
'OliverKlee\\Tea\\Domain\\Repository\\TestimonialRepository', array(), array(), '', false
);
$this->subject->injectTestimonialRepository($this->testimonialRepository); $this->subject->injectTestimonialRepository($this->testimonialRepository);
} }

View file

@ -14,6 +14,9 @@ namespace OliverKlee\Tea\Tests\Unit\Domain\Repository;
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
use OliverKlee\Tea\Domain\Repository\TeaBeverageRepository;
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
/** /**
* Test case. * Test case.
* *
@ -21,19 +24,18 @@ namespace OliverKlee\Tea\Tests\Unit\Domain\Repository;
*/ */
class TeaBeverageRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { class TeaBeverageRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
/** /**
* @var \OliverKlee\Tea\Domain\Model\TeaBeverage * @var TeaBeverageRepository
*/ */
protected $subject; protected $subject;
/** /**
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject * @var ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject
*/ */
protected $objectManager = null; protected $objectManager = null;
protected function setUp() { protected function setUp() {
$this->objectManager = $this->getMock('TYPO3\CMS\Extbase\Object\ObjectManagerInterface'); $this->objectManager = $this->getMock(ObjectManagerInterface::class);
$this->subject = new TeaBeverageRepository($this->objectManager);
$this->subject = new \OliverKlee\Tea\Domain\Repository\TeaBeverageRepository($this->objectManager);
} }
/** /**

View file

@ -14,6 +14,9 @@ namespace OliverKlee\Tea\Tests\Unit\Domain\Repository;
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
use OliverKlee\Tea\Domain\Repository\TestimonialRepository;
/** /**
* Test case. * Test case.
* *
@ -21,19 +24,18 @@ namespace OliverKlee\Tea\Tests\Unit\Domain\Repository;
*/ */
class TestimonialRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { class TestimonialRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
/** /**
* @var \OliverKlee\Tea\Domain\Model\Testimonial * @var TestimonialRepository
*/ */
protected $subject; protected $subject;
/** /**
* @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject * @var ObjectManagerInterface|\PHPUnit_Framework_MockObject_MockObject
*/ */
protected $objectManager = null; protected $objectManager = null;
protected function setUp() { protected function setUp() {
$this->objectManager = $this->getMock('TYPO3\CMS\Extbase\Object\ObjectManagerInterface'); $this->objectManager = $this->getMock(ObjectManagerInterface::class);
$this->subject = new TestimonialRepository($this->objectManager);
$this->subject = new \OliverKlee\Tea\Domain\Repository\TestimonialRepository($this->objectManager);
} }
/** /**

View file

@ -30,9 +30,10 @@ $EM_CONF[$_EXTKEY] = array(
'version' => '0.0.1', 'version' => '0.0.1',
'constraints' => array( 'constraints' => array(
'depends' => array( 'depends' => array(
'php' => '5.5.0-7.0.99',
'typo3' => '6.2.0-7.0.99',
'extbase' => '6.2.0-7.0.99', 'extbase' => '6.2.0-7.0.99',
'fluid' => '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', 'phpunit' => '4.0.0-5.9.99',
), ),
'conflicts' => array( 'conflicts' => array(