mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-10 00:56: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
* @return void
*/
public function getTitleInitiallyReturnsEmptyString() {
$this->assertSame(
@ -56,6 +57,7 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/**
* @test
* @return void
*/
public function setTitleSetsTitle() {
$this->subject->setTitle('foo bar');
@ -68,6 +70,7 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/**
* @test
* @return void
*/
public function getCaffeinatedInitiallyReturnsFalse() {
$this->assertSame(
@ -78,6 +81,7 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
/**
* @test
* @return void
*/
public function setCaffeinatedSetsCaffeinated() {
$this->subject->setCaffeinated(TRUE);
@ -86,4 +90,4 @@ class TeaTypeTest extends \TYPO3\CMS\Extbase\Tests\Unit\BaseTestCase {
$this->subject->getCaffeinated()
);
}
}
}