Esempio n. 1
0
 public function testConfig()
 {
     $utilities = $this->getMockBuilder('Faker\\Components\\Engine\\Common\\Utilities')->disableOriginalConstructor()->getMock();
     $generator = $this->getMock('\\PHPStats\\Generator\\GeneratorInterface');
     $locale = $this->getMock('\\Faker\\Locale\\LocaleInterface');
     $database = $this->getProject()->getGeneratorDatabase();
     $type = new Names($database);
     $type->setGenerator($generator);
     $type->setLocale($locale);
     $type->setUtilities($utilities);
     $type->setOption('format', 'xxxx');
     $this->assertTrue($type->validate());
     $this->assertEquals('xxxx', $type->getOption('format'));
 }