/**
  * @group packageDependencies
  */
 public function testDeletePackageVersionWhenInheritingBetweenPackages()
 {
     $this->packageVersion->addContainer($foo = new Clazz('Foo'));
     $foo->addProperty($fooProperty = new Property('foo'));
     $fooProperty->setPhpType($this->typeRegistry->getNativeType('string'));
     $this->em->persist($this->packageVersion);
     $this->otherPackageVersion->addDependency($this->packageVersion);
     $this->otherPackageVersion->addContainer($bar = new Clazz('bar'));
     $bar->addProperty($fooProperty, 'Foo');
     $this->em->persist($this->otherPackageVersion);
     $this->em->flush();
     $this->assertVersionsCount(2);
     $this->repo->deletePackageVersion($this->packageVersion);
     $this->em->clear();
     $this->assertVersionsCount(0);
 }