/**
* Tests default value callbacks.
*
* @covers ::setDefaultValueCallback
* @dataProvider factoryTypeProvider
*/
public function testDefaultValueCallback($factory_name) { $definition =
$this->
initializeFieldUsingFactory($factory_name);
$callback =
static::
class D '::mockDefaultValueCallback';
// setDefaultValueCallback returns $this.
$this->
assertSame($definition,
$definition->
setDefaultValueCallback($callback));
$this->
assertSame($callback,
$definition->
getDefaultValueCallback());
} /**
* Tests invalid default value callbacks.
*
* @covers ::setDefaultValueCallback
* @dataProvider factoryTypeProvider
*/
public function testInvalidDefaultValueCallback($factory_name) { $definition =
$this->
initializeFieldUsingFactory($factory_name);
// setDefaultValueCallback returns $this.