1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
class PdfReaderTest extends DrupalWebTestCase {
|
3 |
|
|
public static function getInfo() {
|
4 |
|
|
return array(
|
5 |
|
|
'name' => 'PDF Reader tests',
|
6 |
|
|
'description' => 'Tests for PDF Reader module.',
|
7 |
|
|
'group' => 'Other',
|
8 |
|
|
);
|
9 |
|
|
}
|
10 |
|
|
|
11 |
|
|
function testIframeRendering() {
|
12 |
|
|
|
13 |
|
|
$settings = array(
|
14 |
|
|
'file' => array(
|
15 |
|
|
'uri' => 'http://test.com'
|
16 |
|
|
),
|
17 |
|
|
'settings' => array(
|
18 |
5a7e6170
|
Florent Torregrosa
|
'renderer' => 'google',
|
19 |
85ad3d82
|
Assos Assos
|
)
|
20 |
|
|
);
|
21 |
|
|
|
22 |
|
|
$html = theme('pdf_reader', array('file' => $item, 'settings' => $settings));
|
23 |
|
|
$message = t('iframe for Google Viewer should be there.');
|
24 |
|
|
$this->assertNotEqual(strpos($html, 'iframe'), FALSE, $message);
|
25 |
|
|
}
|
26 |
|
|
|
27 |
|
|
function testPdfLoad() {
|
28 |
|
|
|
29 |
|
|
}
|
30 |
|
|
} |