| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | public function testLink() { |
||
| 47 | |||
| 48 | $link = $this->getMockBuilder( '\SMWInfolink' ) |
||
| 49 | ->disableOriginalConstructor() |
||
| 50 | ->getMock(); |
||
| 51 | |||
| 52 | $queryResult = $this->getMockBuilder( '\SMWQueryResult' ) |
||
| 53 | ->disableOriginalConstructor() |
||
| 54 | ->getMock(); |
||
| 55 | |||
| 56 | $queryResult->expects( $this->once() ) |
||
| 57 | ->method( 'getQueryLink' ) |
||
| 58 | ->will( $this->returnValue( $link ) ); |
||
| 59 | |||
| 60 | $queryResult->expects( $this->any() ) |
||
| 61 | ->method( 'getCount' ) |
||
| 62 | ->will( $this->returnValue( 1 ) ); |
||
| 63 | |||
| 64 | $queryResult->expects( $this->any() ) |
||
| 65 | ->method( 'getErrors' ) |
||
| 66 | ->will( $this->returnValue( [] ) ); |
||
| 67 | |||
| 68 | $instance = new SpreadsheetPrinter( 'csv' ); |
||
| 69 | $instance->getResult( $queryResult, [], SMW_OUTPUT_WIKI ); |
||
| 70 | } |
||
| 71 | |||
| 73 |