Exemplo n.º 1
0
 function testEmailDocument()
 {
     $randomFile = APIDocumentHelper::createRandomFile();
     $this->assertTrue(is_file($randomFile));
     $document = $this->root->add_document('testtitle', 'testname.txt', 'Default', $randomFile);
     @unlink($randomFile);
     $this->assertNotError($document);
     if (PEAR::isError($document)) {
         return;
     }
     $members = array('users' => array(1));
     $response = $this->ktapi->email_document($document->get_documentid(), $members, 'Test Email', false);
     $this->assertEqual($response['status_code'], 0);
     $document->delete('Testing');
     $document->expunge();
 }