public static function setStaticProperty($class, $property, $value) { $ref_property = new \ReflectionProperty($class, $property); $ref_property->setAccessible(true); $ref_property->setValue(null, $value); }
/** * setUp */ protected function setUp() { // Make sure no monolog instance is set before each test. TestHelpers::setStaticProperty('Longman\\TelegramBot\\TelegramLog', 'monolog', null); }