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.
 
 
 
 

72 lines
1.9 KiB

<?php
declare(strict_types=1);
namespace App\Tests\Unit\Model\Alertmanager;
use App\Model\Alertmanager\Annotation;
use App\Tests\Unit\UnitTester;
use ReflectionException;
final class CommonAnnotationTest extends UnitTester
{
/**
* @throws ReflectionException
*/
public function testGetDescription(): void
{
$commonAnnotation = new Annotation();
$value = $this->faker->sha256();
$property = $this->getClassProperty($commonAnnotation, 'description');
$property->setValue($commonAnnotation, $value);
self::assertEquals($value, $commonAnnotation->getDescription());
}
/**
* @throws ReflectionException
*/
public function testSetDescription(): void
{
$commonAnnotation = new Annotation();
$value = $this->faker->sha256();
self::assertEquals($commonAnnotation, $commonAnnotation->setDescription($value));
self::assertEquals(
$value,
($this->getClassProperty($commonAnnotation, 'description'))
->getValue($commonAnnotation)
);
}
/**
* @throws ReflectionException
*/
public function testGetSummary(): void
{
$commonAnnotation = new Annotation();
$value = $this->faker->sha256();
$property = $this->getClassProperty($commonAnnotation, 'summary');
$property->setValue($commonAnnotation, $value);
self::assertEquals($value, $commonAnnotation->getSummary());
}
/**
* @throws ReflectionException
*/
public function testSetSummary(): void
{
$commonAnnotation = new Annotation();
$value = $this->faker->sha256();
self::assertEquals($commonAnnotation, $commonAnnotation->setSummary($value));
self::assertEquals(
$value,
($this->getClassProperty($commonAnnotation, 'summary'))
->getValue($commonAnnotation)
);
}
}