states('case_notes')->create(); $doc = new Documents(); $res = $doc->getAppFiles($appDoc->APP_UID, Documents::DOC_TYPE_CASE_NOTE); $this->assertNotEmpty($res); } /** * This test verify if exists attachment files. * * @test * @covers \ProcessMaker\Model\Documents::getAttachedFilesFromTheCaseNote() */ public function it_should_test_get_attached_files_from_the_casenote() { $appNote = factory(AppNotes::class)->create(); $appDocument = factory(Documents::class)->create([ 'DOC_ID' => $appNote->NOTE_ID ]); $appUid = $appDocument->APP_UID; $result = Documents::getAttachedFilesFromTheCaseNote($appUid); $this->assertNotEmpty($result); } /** * This test get files * * @test * @covers \ProcessMaker\Model\Documents::getFiles() * @covers \ProcessMaker\Model\Documents::scopeDocId() */ public function it_should_test_get_files() { $appNote = factory(AppNotes::class)->create(); $appDocument = factory(Documents::class)->create([ 'DOC_ID' => $appNote->NOTE_ID ]); $result = Documents::getFiles($appDocument->DOC_ID); $this->assertNotEmpty($result); } }