// Some test values.
$bad_target = 'uninitialized';
$target = 'test_target_type';
// Gain access to the protected property.
$property =
new \
ReflectionProperty($mock, 'targetEntityType'
);
// Set the property to a known state.
$property->
setValue($mock,
$bad_target);
// Set the target type.
$mock->
setTargetType($target);
// Test the outcome.
$this->
assertNotEquals($bad_target,
$property->
getValue($mock));
$this->
assertEquals($target,
$property->
getValue($mock));
} /**
* @covers ::getTargetType
*/
public function testGetTargetType() { // Generate mock.