faker->randomNumber(); $property = $this->getClassProperty($evalMatches, 'value'); $property->setValue($evalMatches, $value); self::assertEquals($value, $evalMatches->getValue()); } /** * @throws ReflectionException */ public function testSetValue(): void { $evalMatches = new EvalMatches(); $value = $this->faker->randomNumber(); self::assertEquals($evalMatches, $evalMatches->setValue($value)); self::assertEquals( $value, ($this->getClassProperty($evalMatches, 'value')) ->getValue($evalMatches) ); } /** * @throws ReflectionException */ public function testGetMetric(): void { $evalMatches = new EvalMatches(); $value = $this->faker->sha256(); $property = $this->getClassProperty($evalMatches, 'metric'); $property->setValue($evalMatches, $value); self::assertEquals($value, $evalMatches->getMetric()); } /** * @throws ReflectionException */ public function testSetMetric(): void { $evalMatches = new EvalMatches(); $value = $this->faker->sha256(); self::assertEquals($evalMatches, $evalMatches->setMetric($value)); self::assertEquals( $value, ($this->getClassProperty($evalMatches, 'metric')) ->getValue($evalMatches) ); } /** * @dataProvider dataProviderTags * @throws ReflectionException */ public function testGetTags(?string $value): void { $evalMatches = new EvalMatches(); $property = $this->getClassProperty($evalMatches, 'tags'); $property->setValue($evalMatches, $value); self::assertEquals($value, $evalMatches->getTags()); } /** * @dataProvider dataProviderTags * @throws ReflectionException */ public function testSetTags(?string $value): void { $evalMatches = new EvalMatches(); self::assertEquals($evalMatches, $evalMatches->setTags($value)); self::assertEquals( $value, ($this->getClassProperty($evalMatches, 'tags')) ->getValue($evalMatches) ); } public function dataProviderTags(): array { return [ ['tags' => null], ['tags' => $this->faker->sha256()], ]; } }