public function setName($name)
 {
     if (!is_null($this->classLine)) {
         $this->classLine->setClassName($name);
     }
     parent::setName($name);
 }
 public function testSupportsClassKnowsWhichClassesAreSupported()
 {
     // arrange
     $class = new CoveredClass();
     $class->setNamespace("ImagineryNamespace");
     $class->setName("SupportedClass");
     // act
     $factory = new ProxyFactory(array($class));
     // assert
     $this->assertTrue($factory->supports('\\ImagineryNamespace\\SupportedClass'));
     $this->assertFalse($factory->supports('\\ImagineryNamespace\\UnsupportedClass'));
 }
 /**
  * @dataProvider canonicalClassnameDataProvider
  * @param $namespace
  * @param $name
  * @param $expected
  */
 public function testGetCanonicalClassname($namespace, $name, $expected)
 {
     $input = new CoveredClass();
     $input->setNamespace($namespace);
     $input->setName($name);
     $proxy = new ProxyAccessor($input);
     $this->assertEquals($expected, $proxy->getCanonicalClassName($input));
 }