*/ class TestimonialTest extends \TYPO3\CMS\Core\Tests\UnitTestCase { /** * @var \OliverKlee\Tea\Domain\Model\Testimonial */ protected $subject = NULL; protected function setUp() { $this->subject = new \OliverKlee\Tea\Domain\Model\Testimonial(); } /** * @test * @return void */ public function getDateOfPostingInitiallyReturnsNull() { self::assertNull( $this->subject->getDateOfPosting() ); } /** * @test * @return void */ public function setDateOfPostingSetsDateOfPosting() { $date = new \DateTime(); $this->subject->setDateOfPosting($date); self::assertSame( $date, $this->subject->getDateOfPosting() ); } /** * @test * @return void */ public function getNumberOfConsumedCupsInitiallyReturnsZero() { self::assertSame( 0, $this->subject->getNumberOfConsumedCups() ); } /** * @test * @return void */ public function setNumberOfConsumedCupsSetsNumberOfConsumedCups() { $this->subject->setNumberOfConsumedCups(123456); self::assertSame( 123456, $this->subject->getNumberOfConsumedCups() ); } /** * @test * @return void */ public function getTextInitiallyReturnsEmptyString() { self::assertSame( '', $this->subject->getText() ); } /** * @test * @return void */ public function setTextSetsText() { $this->subject->setText('foo bar'); self::assertSame( 'foo bar', $this->subject->getText() ); } }