configuration = new CrudConfiguration(); } protected function getConfigurationReflectionMethod($method) { $method = new \ReflectionMethod( '\Trinity\Bundle\AdminBundle\Configuration\CrudConfiguration', $method ); $method->setAccessible(true); return $method; } public function testFormatNamespace() { $method = $this->getConfigurationReflectionMethod('formatNamespace'); $this->assertEquals( 'Foo\\Bar\\', $method->invoke( $this->configuration, 'Foo\\Bar\\' ) ); $this->assertEquals( 'Foo\\Bar\\', $method->invoke( $this->configuration, 'Foo\\Bar' ) ); } }