Tests/DocumentResolver/Type/OdtTest.php
/**
     * @test
     * @expectedException \Simgroep\ConcurrentSpiderBundle\InvalidContentException
     * @expectedExceptionMessage Odt didn't contain enough content (minimal chars is 3)
     */
@test
@expectedException \Simgroep\ConcurrentSpiderBundle\InvalidContentException
@expectedExceptionMessage Odt didn't contain enough content (minimal chars is 3)
@test @expectedException \ Simgroep \ ConcurrentSpiderBundle \ InvalidContentException @expectedExceptionMessage Odt didn ' t contain enough content ( minimal chars is 3 )
public function throwExceptionOnLessThenMinimalContentLength()
    {
        $resource = $this
            ->getMockBuilder('VDB\Spider\Resource')
            ->disableOriginalConstructor()
            ->getMock();
        $type = $this->getMockBuilder('Simgroep\ConcurrentSpiderBundle\DocumentResolver\Type\Odt')
            ->setMethods(['extractContentFromResource'])
            ->getMock();
        $type->expects($this->once())
            ->method('extractContentFromResource')
            ->with($resource)
            ->will($this->returnValue(''));
        $type->getData($resource);
    }
public function throwExceptionOnLessThenMinimalContentLength ( ) { $ resource = $ this -> getMockBuilder ( 'VDB\Spider\Resource' ) -> disableOriginalConstructor ( ) -> getMock ( ) ; $ type = $ this -> getMockBuilder ( 'Simgroep\ConcurrentSpiderBundle\DocumentResolver\Type\Odt' ) -> setMethods ( [ 'extractContentFromResource' ] ) -> getMock ( ) ; $ type -> expects ( $ this -> once ( ) ) -> method ( 'extractContentFromResource' ) -> with ( $ resource ) -> will ( $ this -> returnValue ( '' ) ) ; $ type -> getData ( $ resource ) ; }
@test
 @expectedException \Simgroep\ConcurrentSpiderBundle\InvalidContentException
 @expectedExceptionMessage Odt didn't contain enough content (minimal chars is 3)
@test @expectedException \ Simgroep \ ConcurrentSpiderBundle \ InvalidContentException @expectedExceptionMessage Odt didn ' t contain enough content ( minimal chars is 3 )