Completed
Push — master ( bde4cf...61750e )
by Daniel
9s
created

PDFTextExtractorTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 16
wmc 2
lcom 0
cbo 3
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testExtraction() 0 13 2
1
<?php
2
class PDFTextExtractorTest extends SapphireTest
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
3
{
4
    public function testExtraction()
5
    {
6
        $extractor = new PDFTextExtractor();
7
        if (!$extractor->isAvailable()) {
8
            $this->setExpectedException(
0 ignored issues
show
Bug introduced by
The method setExpectedException() does not seem to exist on object<PDFTextExtractorTest>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
9
                'FileTextExtractor_Exception',
10
                'getRawOutput called on unavailable extractor'
11
            );
12
        }
13
14
        $content = $extractor->getContent(Director::baseFolder() . '/textextraction/tests/fixtures/test1.pdf');
15
        $this->assertContains('This is a test file with a link', $content);
16
    }
17
}
18