faker->sha256(); $property = $this->getClassProperty($commonLabel, 'alertname'); $property->setValue($commonLabel, $value); self::assertEquals($value, $commonLabel->getAlertName()); } /** * @throws ReflectionException */ public function testSetAlertName(): void { $commonLabel = new Label(); $value = $this->faker->sha256(); self::assertEquals($commonLabel, $commonLabel->setAlertName($value)); self::assertEquals( $value, ($this->getClassProperty($commonLabel, 'alertname')) ->getValue($commonLabel) ); } /** * @throws ReflectionException */ public function testGetInstance(): void { $commonLabel = new Label(); $value = $this->faker->sha256(); $property = $this->getClassProperty($commonLabel, 'instance'); $property->setValue($commonLabel, $value); self::assertEquals($value, $commonLabel->getInstance()); } /** * @throws ReflectionException */ public function testSetInstance(): void { $commonLabel = new Label(); $value = $this->faker->sha256(); self::assertEquals($commonLabel, $commonLabel->setInstance($value)); self::assertEquals( $value, ($this->getClassProperty($commonLabel, 'instance')) ->getValue($commonLabel) ); } /** * @throws ReflectionException */ public function testGetJob(): void { $commonLabel = new Label(); $value = $this->faker->sha256(); $property = $this->getClassProperty($commonLabel, 'job'); $property->setValue($commonLabel, $value); self::assertEquals($value, $commonLabel->getJob()); } /** * @throws ReflectionException */ public function testSetJob(): void { $commonLabel = new Label(); $value = $this->faker->sha256(); self::assertEquals($commonLabel, $commonLabel->setJob($value)); self::assertEquals( $value, ($this->getClassProperty($commonLabel, 'job')) ->getValue($commonLabel) ); } /** * @throws ReflectionException */ public function testGetMonitor(): void { $commonLabel = new Label(); $value = $this->faker->sha256(); $property = $this->getClassProperty($commonLabel, 'monitor'); $property->setValue($commonLabel, $value); self::assertEquals($value, $commonLabel->getMonitor()); } /** * @throws ReflectionException */ public function testSetMonitor(): void { $commonLabel = new Label(); $value = $this->faker->sha256(); self::assertEquals($commonLabel, $commonLabel->setMonitor($value)); self::assertEquals( $value, ($this->getClassProperty($commonLabel, 'monitor')) ->getValue($commonLabel) ); } /** * @throws ReflectionException */ public function testGetSeverity(): void { $commonLabel = new Label(); $value = $this->faker->sha256(); $property = $this->getClassProperty($commonLabel, 'severity'); $property->setValue($commonLabel, $value); self::assertEquals($value, $commonLabel->getSeverity()); } /** * @throws ReflectionException */ public function testSetSeverity(): void { $commonLabel = new Label(); $value = $this->faker->sha256(); self::assertEquals($commonLabel, $commonLabel->setSeverity($value)); self::assertEquals( $value, ($this->getClassProperty($commonLabel, 'severity')) ->getValue($commonLabel) ); } }