mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-14 05:16:12 +01:00
[CLEANUP] Import/use ObjectStorage to avoid duplication
This commit is contained in:
parent
8073f83c8f
commit
c065531f26
1 changed files with 10 additions and 8 deletions
|
@ -14,6 +14,8 @@ namespace OliverKlee\Tea\Tests;
|
||||||
* The TYPO3 project - inspiring people to share!
|
* The TYPO3 project - inspiring people to share!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test case.
|
* Test case.
|
||||||
*
|
*
|
||||||
|
@ -78,7 +80,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
*/
|
*/
|
||||||
public function getAdditionsInitiallyReturnsEmptyStorage() {
|
public function getAdditionsInitiallyReturnsEmptyStorage() {
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(),
|
new ObjectStorage(),
|
||||||
$this->subject->getAdditions()
|
$this->subject->getAdditions()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -87,7 +89,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @test
|
* @test
|
||||||
*/
|
*/
|
||||||
public function setAdditionsSetsAdditions() {
|
public function setAdditionsSetsAdditions() {
|
||||||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$items = new ObjectStorage();
|
||||||
$this->subject->setAdditions($items);
|
$this->subject->setAdditions($items);
|
||||||
|
|
||||||
self::assertSame(
|
self::assertSame(
|
||||||
|
@ -100,7 +102,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @test
|
* @test
|
||||||
*/
|
*/
|
||||||
public function addAdditionAddsAddition() {
|
public function addAdditionAddsAddition() {
|
||||||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$items = new ObjectStorage();
|
||||||
$this->subject->setAdditions($items);
|
$this->subject->setAdditions($items);
|
||||||
|
|
||||||
$newItem = new \OliverKlee\Tea\Domain\Model\Addition();
|
$newItem = new \OliverKlee\Tea\Domain\Model\Addition();
|
||||||
|
@ -115,7 +117,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @test
|
* @test
|
||||||
*/
|
*/
|
||||||
public function removeAdditionRemovesAddition() {
|
public function removeAdditionRemovesAddition() {
|
||||||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$items = new ObjectStorage();
|
||||||
$this->subject->setAdditions($items);
|
$this->subject->setAdditions($items);
|
||||||
|
|
||||||
$newItem = new \OliverKlee\Tea\Domain\Model\Addition();
|
$newItem = new \OliverKlee\Tea\Domain\Model\Addition();
|
||||||
|
@ -132,7 +134,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
*/
|
*/
|
||||||
public function getTestimonialsInitiallyReturnsEmptyStorage() {
|
public function getTestimonialsInitiallyReturnsEmptyStorage() {
|
||||||
self::assertEquals(
|
self::assertEquals(
|
||||||
new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(),
|
new ObjectStorage(),
|
||||||
$this->subject->getTestimonials()
|
$this->subject->getTestimonials()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -141,7 +143,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @test
|
* @test
|
||||||
*/
|
*/
|
||||||
public function setTestimonialsSetsTestimonials() {
|
public function setTestimonialsSetsTestimonials() {
|
||||||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$items = new ObjectStorage();
|
||||||
$this->subject->setTestimonials($items);
|
$this->subject->setTestimonials($items);
|
||||||
|
|
||||||
self::assertSame(
|
self::assertSame(
|
||||||
|
@ -154,7 +156,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @test
|
* @test
|
||||||
*/
|
*/
|
||||||
public function addTestimonialAddsTestimonial() {
|
public function addTestimonialAddsTestimonial() {
|
||||||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$items = new ObjectStorage();
|
||||||
$this->subject->setTestimonials($items);
|
$this->subject->setTestimonials($items);
|
||||||
|
|
||||||
$newItem = new \OliverKlee\Tea\Domain\Model\Testimonial();
|
$newItem = new \OliverKlee\Tea\Domain\Model\Testimonial();
|
||||||
|
@ -169,7 +171,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @test
|
* @test
|
||||||
*/
|
*/
|
||||||
public function removeTestimonialRemovesTestimonial() {
|
public function removeTestimonialRemovesTestimonial() {
|
||||||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$items = new ObjectStorage();
|
||||||
$this->subject->setTestimonials($items);
|
$this->subject->setTestimonials($items);
|
||||||
|
|
||||||
$newItem = new \OliverKlee\Tea\Domain\Model\Testimonial();
|
$newItem = new \OliverKlee\Tea\Domain\Model\Testimonial();
|
||||||
|
|
Loading…
Reference in a new issue