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