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

Add @return void annotation to test methods (PoC)

Missing @return void annotation in phpdoc block of test methods lead to php codesniffer (phpcs) errors when using the TYPO3 CMS coding guidelines:

This function must always have a return value.
(TYPO3SniffPool.Scope.AlwaysReturn.AlwaysReturnStatement)

I suggest to add @return void annotations. Do you agree?
This commit is contained in:
mostwanted 2014-01-01 21:18:39 +01:00
parent f8a77f270f
commit dec404a5f0

View file

@ -46,6 +46,7 @@ class TeaTypeTest 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 TeaTypeTest 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');
@ -68,6 +70,7 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function getCaffeinatedInitiallyReturnsFalse() { public function getCaffeinatedInitiallyReturnsFalse() {
$this->assertSame( $this->assertSame(
@ -78,6 +81,7 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/** /**
* @test * @test
* @return void
*/ */
public function setCaffeinatedSetsCaffeinated() { public function setCaffeinatedSetsCaffeinated() {
$this->subject->setCaffeinated(TRUE); $this->subject->setCaffeinated(TRUE);