Source of file MDTopicCategoryTest.php
Size: 1,085 Bytes - Last Modified: 2021-12-23T10:31:40+00:00
/var/www/docs.ssmods.com/process/src/tests/MDTopicCategoryTest.php
12345678910111213141516171819202122232425262728293031323334353637 | <?php class MDTopicCategoryTest extends SapphireTest { /** * check getTopicCategoryNice */ public function testgetTopicCategoryNice() { $topic = new MDTopicCategory(); $topic->Value = 'biota'; //check initial value $this->assertEquals($topic->Value, 'biota', 'initial data'); // make it nice $topicName=$topic->getTopicCategoryNice(); $this->assertEquals($topicName, 'Biota', 'on initial data'); // checking empty value $topic->Value=''; $topicName=$topic->getTopicCategoryNice(); $this->assertEquals($topicName, '', 'on empty value'); //null-Value should return the default for null $topic->Value=null; $topicName=$topic->getTopicCategoryNice(); $this->assertEquals($topicName, '', 'on null value'); //checking an invalid value $topic->Value='INVALID_TOPIC'; $topicName=$topic->getTopicCategoryNice(); $this->assertEquals($topicName, '', 'on invalid value'); } } |