mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-22 13:36:13 +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
* @return void
*/
public function indexActionCanBeCalled() {
$this->subject->indexAction();
@ -77,6 +78,7 @@ class TestimonialControllerTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa
/**
* @test
* @return void
*/
public function indexActionPassesAllTestimonialsAsTestimonialsToView() {
$allTestimonials = new ObjectStorage();
@ -87,4 +89,4 @@ class TestimonialControllerTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCa
$this->subject->indexAction();
}
}
}

View file

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

View file

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

View file

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

View file

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

View file

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