public function testCheckMatches() { $sessie = $this->getMock('KVDthes_Sessie'); $mapper = $this->getMockForAbstractClass('KVDthes_DbMapper', array(), 'KVDthes_TestMapper', false, false, true, array('loadMatches')); $mapper->expects($this->once())->method('loadMatches'); $sessie->expects($this->once())->method('getMapper')->with('KVDthes_TestTerm')->will($this->returnValue($mapper)); $termType = new KVDthes_TermType('PT', 'voorkeursterm'); $term = new KVDthes_TestTerm(508, $sessie, 'kapellen', $termType, 'bouwkundig erfgoed'); $matches = $term->getMatches(); $this->assertTrue($term->isLoadState(KVDthes_Matchable::LS_MATCH)); }