public function testGeneratPromoCode() { $pc = new PromoCode(); $pc->generate(10); $this->assertSame(10, count($pc), 'Not matching count of codes'); foreach ($pc->getCodes() as $code) { $this->assertSame(10, strlen($code), 'Not matching code length'); } }