mirror of
https://github.com/FriendsOfTYPO3/tea.git
synced 2024-11-10 00:16:13 +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() {
|
||||
$allTestimonials = new ObjectStorage();
|
||||
$this->testimonialRepository->expects($this->any())->method('findAll')
|
||||
->will($this->returnValue($allTestimonials));
|
||||
$this->testimonialRepository->expects(self::any())->method('findAll')
|
||||
->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();
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class AdditionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getTitleInitiallyReturnsEmptyString() {
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
'',
|
||||
$this->subject->getTitle()
|
||||
);
|
||||
|
@ -47,7 +47,7 @@ class AdditionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
public function setTitleSetsTitle() {
|
||||
$this->subject->setTitle('foo bar');
|
||||
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
'foo bar',
|
||||
$this->subject->getTitle()
|
||||
);
|
||||
|
|
|
@ -34,7 +34,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getSizeInitiallyReturnsZero() {
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
0.0,
|
||||
$this->subject->getSize()
|
||||
);
|
||||
|
@ -47,7 +47,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
public function setSizeSetsSize() {
|
||||
$this->subject->setSize(1234.56);
|
||||
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
1234.56,
|
||||
$this->subject->getSize()
|
||||
);
|
||||
|
@ -58,7 +58,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getTypeInitiallyReturnsNull() {
|
||||
$this->assertNull(
|
||||
self::assertNull(
|
||||
$this->subject->getType()
|
||||
);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
$type = new \OliverKlee\Tea\Domain\Model\TeaType();
|
||||
$this->subject->setType($type);
|
||||
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
$type,
|
||||
$this->subject->getType()
|
||||
);
|
||||
|
@ -82,7 +82,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getAdditionsInitiallyReturnsEmptyStorage() {
|
||||
$this->assertEquals(
|
||||
self::assertEquals(
|
||||
new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(),
|
||||
$this->subject->getAdditions()
|
||||
);
|
||||
|
@ -96,7 +96,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$this->subject->setAdditions($items);
|
||||
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
$items,
|
||||
$this->subject->getAdditions()
|
||||
);
|
||||
|
@ -113,7 +113,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
$newItem = new \OliverKlee\Tea\Domain\Model\Addition();
|
||||
$this->subject->addAddition($newItem);
|
||||
|
||||
$this->assertTrue(
|
||||
self::assertTrue(
|
||||
$this->subject->getAdditions()->contains($newItem)
|
||||
);
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
$this->subject->addAddition($newItem);
|
||||
$this->subject->removeAddition($newItem);
|
||||
|
||||
$this->assertFalse(
|
||||
self::assertFalse(
|
||||
$this->subject->getAdditions()->contains($newItem)
|
||||
);
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getTestimonialsInitiallyReturnsEmptyStorage() {
|
||||
$this->assertEquals(
|
||||
self::assertEquals(
|
||||
new \TYPO3\CMS\Extbase\Persistence\ObjectStorage(),
|
||||
$this->subject->getTestimonials()
|
||||
);
|
||||
|
@ -154,7 +154,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
$items = new \TYPO3\CMS\Extbase\Persistence\ObjectStorage();
|
||||
$this->subject->setTestimonials($items);
|
||||
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
$items,
|
||||
$this->subject->getTestimonials()
|
||||
);
|
||||
|
@ -171,7 +171,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
$newItem = new \OliverKlee\Tea\Domain\Model\Testimonial();
|
||||
$this->subject->addTestimonial($newItem);
|
||||
|
||||
$this->assertTrue(
|
||||
self::assertTrue(
|
||||
$this->subject->getTestimonials()->contains($newItem)
|
||||
);
|
||||
}
|
||||
|
@ -188,7 +188,7 @@ class TeaBeverageTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
$this->subject->addTestimonial($newItem);
|
||||
$this->subject->removeTestimonial($newItem);
|
||||
|
||||
$this->assertFalse(
|
||||
self::assertFalse(
|
||||
$this->subject->getTestimonials()->contains($newItem)
|
||||
);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ class TeaTypeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getTitleInitiallyReturnsEmptyString() {
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
'',
|
||||
$this->subject->getTitle()
|
||||
);
|
||||
|
@ -47,7 +47,7 @@ class TeaTypeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
public function setTitleSetsTitle() {
|
||||
$this->subject->setTitle('foo bar');
|
||||
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
'foo bar',
|
||||
$this->subject->getTitle()
|
||||
);
|
||||
|
@ -58,7 +58,7 @@ class TeaTypeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getCaffeinatedInitiallyReturnsFalse() {
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
FALSE,
|
||||
$this->subject->getCaffeinated()
|
||||
);
|
||||
|
@ -70,7 +70,7 @@ class TeaTypeTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
*/
|
||||
public function setCaffeinatedSetsCaffeinated() {
|
||||
$this->subject->setCaffeinated(TRUE);
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
TRUE,
|
||||
$this->subject->getCaffeinated()
|
||||
);
|
||||
|
|
|
@ -34,7 +34,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getDateOfPostingInitiallyReturnsNull() {
|
||||
$this->assertNull(
|
||||
self::assertNull(
|
||||
$this->subject->getDateOfPosting()
|
||||
);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
$date = new \DateTime();
|
||||
$this->subject->setDateOfPosting($date);
|
||||
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
$date,
|
||||
$this->subject->getDateOfPosting()
|
||||
);
|
||||
|
@ -58,7 +58,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getNumberOfConsumedCupsInitiallyReturnsZero() {
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
0,
|
||||
$this->subject->getNumberOfConsumedCups()
|
||||
);
|
||||
|
@ -71,7 +71,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
public function setNumberOfConsumedCupsSetsNumberOfConsumedCups() {
|
||||
$this->subject->setNumberOfConsumedCups(123456);
|
||||
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
123456,
|
||||
$this->subject->getNumberOfConsumedCups()
|
||||
);
|
||||
|
@ -82,7 +82,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function getTextInitiallyReturnsEmptyString() {
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
'',
|
||||
$this->subject->getText()
|
||||
);
|
||||
|
@ -95,7 +95,7 @@ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
public function setTextSetsText() {
|
||||
$this->subject->setText('foo bar');
|
||||
|
||||
$this->assertSame(
|
||||
self::assertSame(
|
||||
'foo bar',
|
||||
$this->subject->getText()
|
||||
);
|
||||
|
|
|
@ -41,7 +41,7 @@ class TeaBeverageRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function canBeInstantiated() {
|
||||
$this->assertNotNull(
|
||||
self::assertNotNull(
|
||||
$this->subject
|
||||
);
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ class TestimonialRepositoryTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function canBeInstantiated() {
|
||||
$this->assertNotNull(
|
||||
self::assertNotNull(
|
||||
$this->subject
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue