Esempio n. 1
0
 public function testGetContextFromNamespace()
 {
     list($namespaceRoot, $servicePrefix, $serviceBundle) = BundleInspect::getContextFromNamespace(__NAMESPACE__);
     $this->assertSame('\\SR\\WonkaBundle', $namespaceRoot);
     $this->assertSame('wonka_bundle', $serviceBundle);
     $this->assertSame('sr', $servicePrefix);
 }
Esempio n. 2
0
 /**
  * @return string[]
  */
 protected function getNamespaceAndVendorAndBundleName()
 {
     $caller = get_class($this);
     list($namespace, $vendor, $bundle) = BundleInspect::getContextFromNamespace($caller);
     return [$namespace, $vendor, $bundle];
 }
 /**
  * @return string
  */
 protected function getRootName()
 {
     return BundleInspect::getName(get_called_class());
 }