1 | <?php |
||
16 | class SemanticDataComparatorTest extends \PHPUnit_Framework_TestCase { |
||
17 | |||
18 | public function testCanConstruct() { |
||
38 | |||
39 | /** |
||
40 | * @dataProvider propertyIdProvider |
||
41 | */ |
||
42 | public function testInspectForEmptyData( $propertyId ) { |
||
43 | |||
44 | $store = $this->getMockBuilder( '\SMW\Store' ) |
||
45 | ->disableOriginalConstructor() |
||
46 | ->getMockForAbstractClass(); |
||
47 | |||
48 | $store->method( 'getPropertyValues' ) |
||
49 | ->willReturn( [] ); |
||
50 | |||
51 | $semanticData = $this->getMockBuilder( '\SMW\SemanticData' ) |
||
52 | ->disableOriginalConstructor() |
||
53 | ->getMock(); |
||
54 | |||
55 | $semanticData->expects( $this->once() ) |
||
56 | ->method( 'getProperties' ) |
||
57 | ->will( $this->returnValue( array() ) ); |
||
58 | |||
59 | $instance = new SemanticDataComparator( |
||
60 | $store, |
||
61 | $semanticData |
||
62 | ); |
||
63 | |||
64 | $this->assertFalse( |
||
65 | $instance->compareForProperty( $propertyId ) |
||
66 | ); |
||
67 | } |
||
68 | |||
69 | public function propertyIdProvider() { |
||
78 | |||
79 | } |
||
80 |