public function testTypePropertiesSet()
 {
     $utilities = $this->getMockBuilder('Faker\\Components\\Engine\\Common\\Utilities')->disableOriginalConstructor()->getMock();
     $generator = $this->getMock('\\PHPStats\\Generator\\GeneratorInterface');
     $locale = $this->getMock('\\Faker\\Locale\\LocaleInterface');
     $event = $this->getMockBuilder('Symfony\\Component\\EventDispatcher\\EventDispatcherInterface')->getMock();
     $database = $this->getMockBuilder('Doctrine\\DBAL\\Connection')->disableOriginalConstructor()->getMock();
     $type = new AlphaNumericTypeDefinition();
     $type->eventDispatcher($event);
     $type->database($database);
     $type->locale($locale);
     $type->utilities($utilities);
     $type->generator($generator);
     $type->format('CcVDx')->repeatMax(5)->repeatMin(3);
     $typeNode = $type->getNode();
     $interalType = $typeNode->getType();
     $this->assertEquals('CcVDx', $interalType->getOption('format'));
     $this->assertEquals(5, $interalType->getOption('repeatMax'));
     $this->assertEquals(3, $interalType->getOption('repeatMin'));
     $this->assertEquals($generator, $interalType->getGenerator());
     $this->assertEquals($locale, $interalType->getLocale());
     $this->assertEquals($utilities, $interalType->getUtilities());
 }
 public function end()
 {
     return parent::end();
 }