public function testGetPercentageCompletionsFemale() { $completions = 60; $num = (int) rand(1, 50); $expected = round($num / $completions * 100, AnalyticsExport::PERCENTAGE_PRECISION); $this->assertInstanceOf(AnalyticsExport::class, $this->instance->setCompletions($completions)); $this->assertEquals($completions, $this->instance->getCompletions()); $this->assertInstanceOf(AnalyticsExport::class, $this->instance->setGenderCompletionsFemale($num)); $this->assertEquals($num, $this->instance->getGenderCompletionsFemale()); $this->assertEquals($expected, $this->instance->getPercentageCompletionsFemale()); }