Example #1
0
 /**
  * Test
  *
  * @return void
  */
 public function testPublishActionWithDisableDocument()
 {
     $this->document->setStatus(DocumentModel::STATUS_DISABLE);
     $this->document->save();
     $this->dispatch('/admin/content/document/publish/' . $this->document->getId());
     $this->assertResponseStatusCode(200);
     $this->assertModuleName('GcContent');
     $this->assertControllerName('DocumentController');
     $this->assertControllerClass('DocumentController');
     $this->assertMatchedRouteName('content/document/publish');
     $document = DocumentModel::fromId($this->document->getId());
     $this->assertTrue($document->isPublished());
 }
Example #2
0
 /**
  * Test
  *
  * @return void
  */
 public function testIsPublished()
 {
     $this->object->setStatus(Model::STATUS_ENABLE);
     $this->assertTrue($this->object->isPublished());
 }