mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-14 05:16:12 +01:00
[CLEANUP] Call static PHPUnit methods using self::
This commit is contained in:
parent
3db3e7af04
commit
662026c630
7 changed files with 29 additions and 29 deletions
|
@ -66,10 +66,10 @@ class TestimonialControllerTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
*/
|
*/
|
||||||
public function indexActionPassesAllTestimonialsAsTestimonialsToView() {
|
public function indexActionPassesAllTestimonialsAsTestimonialsToView() {
|
||||||
$allTestimonials = new ObjectStorage();
|
$allTestimonials = new ObjectStorage();
|
||||||
$this->testimonialRepository->expects($this->any())->method('findAll')
|
$this->testimonialRepository->expects(self::any())->method('findAll')
|
||||||
->will($this->returnValue($allTestimonials));
|
->will(self::returnValue($allTestimonials));
|
||||||
|
|
||||||
$this->view->expects($this->once())->method('assign')->with('testimonials', $allTestimonials);
|
$this->view->expects(self::once())->method('assign')->with('testimonials', $allTestimonials);
|
||||||
|
|
||||||
$this->subject->indexAction();
|
$this->subject->indexAction();
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class AdditionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getTitleInitiallyReturnsEmptyString() {
|
public function getTitleInitiallyReturnsEmptyString() {
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
'',
|
'',
|
||||||
$this->subject->getTitle()
|
$this->subject->getTitle()
|
||||||
);
|
);
|
||||||
|
@ -47,7 +47,7 @@ class AdditionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
public function setTitleSetsTitle() {
|
public function setTitleSetsTitle() {
|
||||||
$this->subject->setTitle('foo bar');
|
$this->subject->setTitle('foo bar');
|
||||||
|
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
'foo bar',
|
'foo bar',
|
||||||
$this->subject->getTitle()
|
$this->subject->getTitle()
|
||||||
);
|
);
|
||||||
|
|
|
@ -34,7 +34,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getSizeInitiallyReturnsZero() {
|
public function getSizeInitiallyReturnsZero() {
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
0.0,
|
0.0,
|
||||||
$this->subject->getSize()
|
$this->subject->getSize()
|
||||||
);
|
);
|
||||||
|
@ -47,7 +47,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
public function setSizeSetsSize() {
|
public function setSizeSetsSize() {
|
||||||
$this->subject->setSize(1234.56);
|
$this->subject->setSize(1234.56);
|
||||||
|
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
1234.56,
|
1234.56,
|
||||||
$this->subject->getSize()
|
$this->subject->getSize()
|
||||||
);
|
);
|
||||||
|
@ -58,7 +58,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getTypeInitiallyReturnsNull() {
|
public function getTypeInitiallyReturnsNull() {
|
||||||
$this->assertNull(
|
self::assertNull(
|
||||||
$this->subject->getType()
|
$this->subject->getType()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
$type = new \OliverKlee\Tea\Domain\Model\TeaType();
|
$type = new \OliverKlee\Tea\Domain\Model\TeaType();
|
||||||
$this->subject->setType($type);
|
$this->subject->setType($type);
|
||||||
|
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
$type,
|
$type,
|
||||||
$this->subject->getType()
|
$this->subject->getType()
|
||||||
);
|
);
|
||||||
|
@ -82,7 +82,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getAdditionsInitiallyReturnsEmptyStorage() {
|
public function getAdditionsInitiallyReturnsEmptyStorage() {
|
||||||
$this->assertEquals(
|
self::assertEquals(
|
||||||
new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(),
|
new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(),
|
||||||
$this->subject->getAdditions()
|
$this->subject->getAdditions()
|
||||||
);
|
);
|
||||||
|
@ -96,7 +96,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||||
$this->subject->setAdditions($items);
|
$this->subject->setAdditions($items);
|
||||||
|
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
$items,
|
$items,
|
||||||
$this->subject->getAdditions()
|
$this->subject->getAdditions()
|
||||||
);
|
);
|
||||||
|
@ -113,7 +113,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
$newItem = new \OliverKlee\Tea\Domain\Model\Addition();
|
$newItem = new \OliverKlee\Tea\Domain\Model\Addition();
|
||||||
$this->subject->addAddition($newItem);
|
$this->subject->addAddition($newItem);
|
||||||
|
|
||||||
$this->assertTrue(
|
self::assertTrue(
|
||||||
$this->subject->getAdditions()->contains($newItem)
|
$this->subject->getAdditions()->contains($newItem)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
$this->subject->addAddition($newItem);
|
$this->subject->addAddition($newItem);
|
||||||
$this->subject->removeAddition($newItem);
|
$this->subject->removeAddition($newItem);
|
||||||
|
|
||||||
$this->assertFalse(
|
self::assertFalse(
|
||||||
$this->subject->getAdditions()->contains($newItem)
|
$this->subject->getAdditions()->contains($newItem)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getTestimonialsInitiallyReturnsEmptyStorage() {
|
public function getTestimonialsInitiallyReturnsEmptyStorage() {
|
||||||
$this->assertEquals(
|
self::assertEquals(
|
||||||
new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(),
|
new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(),
|
||||||
$this->subject->getTestimonials()
|
$this->subject->getTestimonials()
|
||||||
);
|
);
|
||||||
|
@ -154,7 +154,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||||
$this->subject->setTestimonials($items);
|
$this->subject->setTestimonials($items);
|
||||||
|
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
$items,
|
$items,
|
||||||
$this->subject->getTestimonials()
|
$this->subject->getTestimonials()
|
||||||
);
|
);
|
||||||
|
@ -171,7 +171,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
$newItem = new \OliverKlee\Tea\Domain\Model\Testimonial();
|
$newItem = new \OliverKlee\Tea\Domain\Model\Testimonial();
|
||||||
$this->subject->addTestimonial($newItem);
|
$this->subject->addTestimonial($newItem);
|
||||||
|
|
||||||
$this->assertTrue(
|
self::assertTrue(
|
||||||
$this->subject->getTestimonials()->contains($newItem)
|
$this->subject->getTestimonials()->contains($newItem)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
$this->subject->addTestimonial($newItem);
|
$this->subject->addTestimonial($newItem);
|
||||||
$this->subject->removeTestimonial($newItem);
|
$this->subject->removeTestimonial($newItem);
|
||||||
|
|
||||||
$this->assertFalse(
|
self::assertFalse(
|
||||||
$this->subject->getTestimonials()->contains($newItem)
|
$this->subject->getTestimonials()->contains($newItem)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,7 +34,7 @@ class TeaTypeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getTitleInitiallyReturnsEmptyString() {
|
public function getTitleInitiallyReturnsEmptyString() {
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
'',
|
'',
|
||||||
$this->subject->getTitle()
|
$this->subject->getTitle()
|
||||||
);
|
);
|
||||||
|
@ -47,7 +47,7 @@ class TeaTypeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
public function setTitleSetsTitle() {
|
public function setTitleSetsTitle() {
|
||||||
$this->subject->setTitle('foo bar');
|
$this->subject->setTitle('foo bar');
|
||||||
|
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
'foo bar',
|
'foo bar',
|
||||||
$this->subject->getTitle()
|
$this->subject->getTitle()
|
||||||
);
|
);
|
||||||
|
@ -58,7 +58,7 @@ class TeaTypeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getCaffeinatedInitiallyReturnsFalse() {
|
public function getCaffeinatedInitiallyReturnsFalse() {
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
FALSE,
|
FALSE,
|
||||||
$this->subject->getCaffeinated()
|
$this->subject->getCaffeinated()
|
||||||
);
|
);
|
||||||
|
@ -70,7 +70,7 @@ class TeaTypeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
*/
|
*/
|
||||||
public function setCaffeinatedSetsCaffeinated() {
|
public function setCaffeinatedSetsCaffeinated() {
|
||||||
$this->subject->setCaffeinated(TRUE);
|
$this->subject->setCaffeinated(TRUE);
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
TRUE,
|
TRUE,
|
||||||
$this->subject->getCaffeinated()
|
$this->subject->getCaffeinated()
|
||||||
);
|
);
|
||||||
|
|
|
@ -34,7 +34,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getDateOfPostingInitiallyReturnsNull() {
|
public function getDateOfPostingInitiallyReturnsNull() {
|
||||||
$this->assertNull(
|
self::assertNull(
|
||||||
$this->subject->getDateOfPosting()
|
$this->subject->getDateOfPosting()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
$date = new \DateTime();
|
$date = new \DateTime();
|
||||||
$this->subject->setDateOfPosting($date);
|
$this->subject->setDateOfPosting($date);
|
||||||
|
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
$date,
|
$date,
|
||||||
$this->subject->getDateOfPosting()
|
$this->subject->getDateOfPosting()
|
||||||
);
|
);
|
||||||
|
@ -58,7 +58,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getNumberOfConsumedCupsInitiallyReturnsZero() {
|
public function getNumberOfConsumedCupsInitiallyReturnsZero() {
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
0,
|
0,
|
||||||
$this->subject->getNumberOfConsumedCups()
|
$this->subject->getNumberOfConsumedCups()
|
||||||
);
|
);
|
||||||
|
@ -71,7 +71,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
public function setNumberOfConsumedCupsSetsNumberOfConsumedCups() {
|
public function setNumberOfConsumedCupsSetsNumberOfConsumedCups() {
|
||||||
$this->subject->setNumberOfConsumedCups(123456);
|
$this->subject->setNumberOfConsumedCups(123456);
|
||||||
|
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
123456,
|
123456,
|
||||||
$this->subject->getNumberOfConsumedCups()
|
$this->subject->getNumberOfConsumedCups()
|
||||||
);
|
);
|
||||||
|
@ -82,7 +82,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function getTextInitiallyReturnsEmptyString() {
|
public function getTextInitiallyReturnsEmptyString() {
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
'',
|
'',
|
||||||
$this->subject->getText()
|
$this->subject->getText()
|
||||||
);
|
);
|
||||||
|
@ -95,7 +95,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
public function setTextSetsText() {
|
public function setTextSetsText() {
|
||||||
$this->subject->setText('foo bar');
|
$this->subject->setText('foo bar');
|
||||||
|
|
||||||
$this->assertSame(
|
self::assertSame(
|
||||||
'foo bar',
|
'foo bar',
|
||||||
$this->subject->getText()
|
$this->subject->getText()
|
||||||
);
|
);
|
||||||
|
|
|
@ -41,7 +41,7 @@ class TeaBeverageRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function canBeInstantiated() {
|
public function canBeInstantiated() {
|
||||||
$this->assertNotNull(
|
self::assertNotNull(
|
||||||
$this->subject
|
$this->subject
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ class TestimonialRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function canBeInstantiated() {
|
public function canBeInstantiated() {
|
||||||
$this->assertNotNull(
|
self::assertNotNull(
|
||||||
$this->subject
|
$this->subject
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue