/**
  * @depends testDefaultClassImplementationIsCreatedWhenThereIsNoDefinedClassTypeImplementation
  */
 public function testDefaultClassImplementationIsCreatedBasedOnGlobalClassTypeImplementation()
 {
     $this->globalClassOptions->setAccessorsEnabled(true)->setAccessorsStyle(new CamelCaseStyle());
     $this->classMap->registerClass('helicopter', 'ConcreteXylophone');
     $implementation = new ClassTypeImplementation('helicopter');
     $implementation->setClassName('ConcreteXylophone')->setAccessorsEnabled(true)->setAccessorsStyle(new CamelCaseStyle());
     $this->assertEquals($implementation, $this->object->getClassTypeImplementation('helicopter'));
 }
 public function testProperHandlingOfCircularReferences()
 {
     $user = new ClassOutline('User');
     $admin = new ClassOutline('Admin');
     $user->addProperty(new PropertyOutline('admin', $admin));
     $admin->addProperty(new PropertyOutline('user', $user));
     $this->classMap->registerClass('User', 'User')->registerClass('Admin', 'Admin');
     $userType = $this->object->generate($user, $this->implementation);
     $properties = $userType->getProperties();
     $adminType = $properties['admin']->getType();
     $properties = $adminType->getProperties();
     $this->assertSame($userType, $properties['user']->getType());
 }