public function testGetPercentageStartsProvidedPostcode() { $total = 60; $num = (int) rand(1, 50); $expected = round($num / $total * 100, AnalyticsExport::PERCENTAGE_PRECISION); $this->assertInstanceOf(AnalyticsExport::class, $this->instance->setStarts($total)); $this->assertEquals($total, $this->instance->getStarts()); $this->assertInstanceOf(AnalyticsExport::class, $this->instance->setProvidedPostCodes($num)); $this->assertEquals($num, $this->instance->getProvidedPostCodes()); $this->assertEquals($expected, $this->instance->getPercentageStartsProvidedPostCode()); }