public function test_can_only_create_overrides_for_existing_attributes_or_relations()
 {
     $this->setExpectedException(InvalidArgumentException::class, 'No attribute or association could be found for some_field');
     $builder = new ClassMetadataBuilder(new ClassMetadataInfo(StubEntity::class));
     OverrideBuilderFactory::create($builder, new DefaultNamingStrategy(), 'some_field', function ($relation) {
         return $relation;
     });
 }
Example #2
0
 /**
  * Execute the build process
  */
 public function build()
 {
     $builder = OverrideBuilderFactory::create($this->builder, $this->namingStrategy, $this->name, $this->callback);
     $builder->build();
 }