示例#1
0
 protected function setUp()
 {
     $this->builder = new ClassMetadataBuilder(new ClassMetadataInfo(FluentEntity::class));
     // OneToMany needs to have the parent to be mapped
     $relation = new ManyToOne($this->builder, new DefaultNamingStrategy(), 'parent', FluentEntity::class);
     $relation->build();
     $this->relation = new OneToMany($this->builder, new DefaultNamingStrategy(), $this->field, FluentEntity::class);
     $this->relation->mappedBy('parent');
 }
示例#2
0
 public function test_can_set_onDelete()
 {
     $this->relation->onDelete('delete');
     $this->assertEquals('delete', $this->relation->getJoinColumn()->getOnDelete());
 }