faker->sha256(); $property = $this->getClassProperty($status, 'state'); $property->setValue($status, $state); self::assertEquals($state, $status->getState()); } /** * @throws ReflectionException */ public function testSetLabels(): void { $status = new Status(); $state = $this->faker->sha256(); self::assertEquals($status, $status->setState($state)); self::assertEquals( $state, ($this->getClassProperty($status, 'state')) ->getValue($status) ); } /** * @dataProvider dataProviderSilencedBy * @throws ReflectionException */ public function testGetSilencedBy(?string $silencedBy): void { $status = new Status(); $property = $this->getClassProperty($status, 'silencedBy'); $property->setValue($status, $silencedBy); self::assertEquals($silencedBy, $status->getSilencedBy()); } /** * @dataProvider dataProviderSilencedBy * @throws ReflectionException */ public function testSetSilencedBy(?string $silencedBy): void { $status = new Status(); self::assertEquals($status, $status->setSilencedBy($silencedBy)); self::assertEquals( $silencedBy, ($this->getClassProperty($status, 'silencedBy')) ->getValue($status) ); } public function dataProviderSilencedBy(): array { return [ ['silencedBy' => null], ['silencedBy' => $this->faker->sha256()], ]; } /** * @dataProvider dataProviderInhibitedBy * @throws ReflectionException */ public function testGetInhibitedBy(?string $inhibitedBy): void { $status = new Status(); $property = $this->getClassProperty($status, 'inhibitedBy'); $property->setValue($status, $inhibitedBy); self::assertEquals($inhibitedBy, $status->getInhibitedBy()); } /** * @dataProvider dataProviderInhibitedBy * @throws ReflectionException */ public function testSetInhibitedBy(?string $inhibitedBy): void { $status = new Status(); self::assertEquals($status, $status->setInhibitedBy($inhibitedBy)); self::assertEquals( $inhibitedBy, ($this->getClassProperty($status, 'inhibitedBy')) ->getValue($status) ); } public function dataProviderInhibitedBy(): array { return [ ['inhibitedBy' => null], ['inhibitedBy' => $this->faker->sha256()], ]; } }