Esempio n. 1
0
 /**
  * @test
  */
 public function it_can_generate_initials_from_email()
 {
     $generator = new \Laravolt\Avatar\InitialGenerator('*****@*****.**');
     $this->assertEquals('ab', $generator->getInitial());
     $generator = new \Laravolt\Avatar\InitialGenerator('*****@*****.**');
     $this->assertEquals('ci', $generator->getInitial());
     $generator = new \Laravolt\Avatar\InitialGenerator('*****@*****.**');
     $this->assertEquals('DA', $generator->getInitial());
 }
 /**
  * @test
  */
 public function it_can_convert_to_ascii()
 {
     $generator = new \Laravolt\Avatar\InitialGenerator('Bāyu');
     $generator->setAscii(true);
     $this->assertEquals('Ba', (string) $generator->getInitial());
 }