27 public function testMerge( $t1, $n1, $t2, $n2, $result ) {
29 $this->getMockBuilder( SearchIndexFieldDefinition::class )
30 ->setMethods( [
'getMapping' ] )
31 ->setConstructorArgs( [ $n1, $t1 ] )
34 $this->getMockBuilder( SearchIndexFieldDefinition::class )
35 ->setMethods( [
'getMapping' ] )
36 ->setConstructorArgs( [ $n2, $t2 ] )
40 $this->assertNotFalse( $field1->merge( $field2 ) );
42 $this->assertFalse( $field1->merge( $field2 ) );
45 $field1->setFlag( 0xFF );
46 $this->assertFalse( $field1->merge( $field2 ) );
48 $field1->setMergeCallback(
53 $this->assertEquals(
"test", $field1->merge( $field2 ) );