CategoryTest.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. declare(strict_types=1);
  3. namespace Meramo\Chatbotui\Tests\Unit\Domain\Model;
  4. use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
  5. /**
  6. * Test case
  7. *
  8. * @author Meramo Developer <develop@meramo.de>
  9. */
  10. class CategoryTest extends UnitTestCase
  11. {
  12. /**
  13. * @var \Meramo\Chatbotui\Domain\Model\Category
  14. */
  15. protected $subject;
  16. protected function setUp()
  17. {
  18. parent::setUp();
  19. $this->subject = new \Meramo\Chatbotui\Domain\Model\Category();
  20. }
  21. protected function tearDown()
  22. {
  23. parent::tearDown();
  24. }
  25. /**
  26. * @test
  27. */
  28. public function getCategoryReturnsInitialValueForString()
  29. {
  30. self::assertSame(
  31. '',
  32. $this->subject->getCategory()
  33. );
  34. }
  35. /**
  36. * @test
  37. */
  38. public function setCategoryForStringSetsCategory()
  39. {
  40. $this->subject->setCategory('Conceived at T3CON10');
  41. self::assertAttributeEquals(
  42. 'Conceived at T3CON10',
  43. 'category',
  44. $this->subject
  45. );
  46. }
  47. }