grafana -> notification-provider -> mattermost | see https://gitlab.fedy95.com/dev/notification-provider
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

37 lines
839 B

<?php
declare(strict_types=1);
namespace App\Tests\Unit;
use Faker\Factory;
use Faker\Generator;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
use ReflectionException;
use ReflectionProperty;
class UnitTester extends TestCase
{
protected Generator $faker;
public function __construct(?string $name = null, array $data = [], $dataName = '')
{
parent::__construct($name, $data, $dataName);
$this->faker = (Factory::create('en_EN'));
}
/**
* @throws ReflectionException
*/
public function getClassProperty(
mixed $classObject, string $propertyName
): ReflectionProperty
{
$reflector = new ReflectionClass($classObject);
$property = $reflector->getProperty($propertyName);
$property->setAccessible(true);
return $property;
}
}