Beispiel #1
0
 /**
  * Testing that a BO attached to a controller that contains tags will have those tags mapped to the controller's keywords.
  *
  * @since 1.0
  */
 public function testTagsMapToMetaKeywords()
 {
     ActiveRecord::begin();
     $this->article->save();
     ActiveRecord::commit();
     $tags = $this->article->getPropObject('tags')->getRelatedObjects();
     $found = false;
     foreach ($tags as $tag) {
         if ($tag->get('content') == 'unittestarticle') {
             $found = true;
             break;
         }
     }
     $this->assertTrue($found, 'Testing the Tag::tokenize method returns a tag called "unittestarticle"');
     $this->controller->setRecord($this->article);
     $this->assertEquals('unittestarticle,unittestarticletagone,unittestarticletagtwo', $this->controller->getKeywords(), 'Testing that a BO attached to a controller that contains tags will have those tags mapped to the controller\'s keywords');
 }