GcContent\Controller\DocumentControllerTest::testPublishActionWithDisableDocument PHP Метод

testPublishActionWithDisableDocument() публичный Метод

Test
public testPublishActionWithDisableDocument ( ) : void
Результат 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());
    }