mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-22 14:16:12 +01:00

Merge pull request #2 from mostwanted1976/patch-1

[CLEANUP] Add @return void annotation to @test methods
This commit is contained in:
Oliver Klee 2014-01-01 15:37:18 -08:00
commit 3aae93f279
6 changed files with 30 additions and 6 deletions

View file

@ -70,6 +70,7 @@ class TestimonialControllerTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa
/** /**
* @test * @test
* @return void
*/ */
public function indexActionCanBeCalled() { public function indexActionCanBeCalled() {
$this->subject->indexAction(); $this->subject->indexAction();
@ -77,6 +78,7 @@ class TestimonialControllerTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa
/** /**
* @test * @test
* @return void
*/ */
public function indexActionPassesAllTestimonialsAsTestimonialsToView() { public function indexActionPassesAllTestimonialsAsTestimonialsToView() {
$allTestimonials = new ObjectStorage(); $allTestimonials = new ObjectStorage();
@ -87,4 +89,4 @@ class TestimonialControllerTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa
$this->subject->indexAction(); $this->subject->indexAction();
} }
} }

View file

@ -46,6 +46,7 @@ class AdditionTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function getTitleInitiallyReturnsEmptyString() { public function getTitleInitiallyReturnsEmptyString() {
$this->assertSame( $this->assertSame(
@ -56,6 +57,7 @@ class AdditionTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function setTitleSetsTitle() { public function setTitleSetsTitle() {
$this->subject->setTitle('foo bar'); $this->subject->setTitle('foo bar');
@ -65,4 +67,4 @@ class AdditionTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
$this->subject->getTitle() $this->subject->getTitle()
); );
} }
} }

View file

@ -46,6 +46,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function getSizeInitiallyReturnsZero() { public function getSizeInitiallyReturnsZero() {
$this->assertSame( $this->assertSame(
@ -56,6 +57,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function setSizeSetsSize() { public function setSizeSetsSize() {
$this->subject->setSize(1234.56); $this->subject->setSize(1234.56);
@ -68,6 +70,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function getTypeInitiallyReturnsNull() { public function getTypeInitiallyReturnsNull() {
$this->assertNull( $this->assertNull(
@ -77,6 +80,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function setTypeSetsType() { public function setTypeSetsType() {
$type = new \OliverKlee\Tea\Domain\Model\TeaType(); $type = new \OliverKlee\Tea\Domain\Model\TeaType();
@ -90,6 +94,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function getAdditionsInitiallyReturnsEmptyStorage() { public function getAdditionsInitiallyReturnsEmptyStorage() {
$this->assertEquals( $this->assertEquals(
@ -100,6 +105,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function setAdditionsSetsAdditions() { public function setAdditionsSetsAdditions() {
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); $items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
@ -113,6 +119,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function addAdditionAddsAddition() { public function addAdditionAddsAddition() {
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); $items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
@ -128,6 +135,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function removeAdditionRemovesAddition() { public function removeAdditionRemovesAddition() {
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); $items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
@ -144,6 +152,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function getTestimonialsInitiallyReturnsEmptyStorage() { public function getTestimonialsInitiallyReturnsEmptyStorage() {
$this->assertEquals( $this->assertEquals(
@ -154,6 +163,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function setTestimonialsSetsTestimonials() { public function setTestimonialsSetsTestimonials() {
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); $items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
@ -167,6 +177,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function addTestimonialAddsTestimonial() { public function addTestimonialAddsTestimonial() {
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); $items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
@ -182,6 +193,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function removeTestimonialRemovesTestimonial() { public function removeTestimonialRemovesTestimonial() {
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(); $items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
@ -195,4 +207,4 @@ class TeaBeverageTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
$this->subject->getTestimonials()->contains($newItem) $this->subject->getTestimonials()->contains($newItem)
); );
} }
} }

View file

@ -46,6 +46,7 @@ class TestimonialTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function getDateOfPostingInitiallyReturnsNull() { public function getDateOfPostingInitiallyReturnsNull() {
$this->assertNull( $this->assertNull(
@ -55,6 +56,7 @@ class TestimonialTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function setDateOfPostingSetsDateOfPosting() { public function setDateOfPostingSetsDateOfPosting() {
$date = new \DateTime(); $date = new \DateTime();
@ -68,6 +70,7 @@ class TestimonialTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function getNumberOfConsumedCupsInitiallyReturnsZero() { public function getNumberOfConsumedCupsInitiallyReturnsZero() {
$this->assertSame( $this->assertSame(
@ -78,6 +81,7 @@ class TestimonialTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function setNumberOfConsumedCupsSetsNumberOfConsumedCups() { public function setNumberOfConsumedCupsSetsNumberOfConsumedCups() {
$this->subject->setNumberOfConsumedCups(123456); $this->subject->setNumberOfConsumedCups(123456);
@ -90,6 +94,7 @@ class TestimonialTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function getTextInitiallyReturnsEmptyString() { public function getTextInitiallyReturnsEmptyString() {
$this->assertSame( $this->assertSame(
@ -100,6 +105,7 @@ class TestimonialTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function setTextSetsText() { public function setTextSetsText() {
$this->subject->setText('foo bar'); $this->subject->setText('foo bar');
@ -109,4 +115,4 @@ class TestimonialTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
$this->subject->getText() $this->subject->getText()
); );
} }
} }

View file

@ -53,10 +53,11 @@ class TeaBeverageRepositoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa
/** /**
* @test * @test
* @return void
*/ */
public function canBeInstantiated() { public function canBeInstantiated() {
$this->assertNotNull( $this->assertNotNull(
$this->subject $this->subject
); );
} }
} }

View file

@ -53,10 +53,11 @@ class TestimonialRepositoryTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa
/** /**
* @test * @test
* @return void
*/ */
public function canBeInstantiated() { public function canBeInstantiated() {
$this->assertNotNull( $this->assertNotNull(
$this->subject $this->subject
); );
} }
} }