| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function testLink() { |
||
| 26 | |||
| 27 | $link = $this->getMockBuilder( '\SMWInfolink' ) |
||
| 28 | ->disableOriginalConstructor() |
||
| 29 | ->getMock(); |
||
| 30 | |||
| 31 | $queryResult = $this->getMockBuilder( '\SMWQueryResult' ) |
||
| 32 | ->disableOriginalConstructor() |
||
| 33 | ->getMock(); |
||
| 34 | |||
| 35 | $queryResult->expects( $this->once() ) |
||
| 36 | ->method( 'getQueryLink' ) |
||
| 37 | ->will( $this->returnValue( $link ) ); |
||
| 38 | |||
| 39 | $queryResult->expects( $this->any() ) |
||
| 40 | ->method( 'getCount' ) |
||
| 41 | ->will( $this->returnValue( 1 ) ); |
||
| 42 | |||
| 43 | $queryResult->expects( $this->any() ) |
||
| 44 | ->method( 'getErrors' ) |
||
| 45 | ->will( $this->returnValue( [] ) ); |
||
| 46 | |||
| 47 | $instance = new SpreadsheetPrinter( 'csv' ); |
||
| 48 | $instance->getResult( $queryResult, [], SMW_OUTPUT_WIKI ); |
||
| 49 | } |
||
| 50 | |||
| 52 |