public function testFastArrayAccessHelper()
 {
     $fastArrayAccessHelper = new \Synga\InheritanceFinder\Helpers\FastArrayAccessHelper();
     $phpClass = new \Synga\InheritanceFinder\PhpClass();
     $phpClass->setFile(new \Symfony\Component\Finder\SplFileInfo(__DIR__, __DIR__, __DIR__));
     $arrayTest = [$phpClass];
     $fastArrayAccessHelperResult = $fastArrayAccessHelper->getPathnameArray($arrayTest);
     $this->assertCount(1, $fastArrayAccessHelperResult);
     $this->assertSame(__DIR__, key($fastArrayAccessHelperResult));
 }
Ejemplo n.º 2
0
 public function testSerialization()
 {
     $fullQualifiedNamespace = 'Full\\Qualified\\Namespace';
     $phpClass = new \Synga\InheritanceFinder\PhpClass();
     $file = new \Symfony\Component\Finder\SplFileInfo(__FILE__, __FILE__, __FILE__);
     $phpClass->setFile($file);
     $phpClass->setFullQualifiedNamespace($fullQualifiedNamespace);
     $serialized = serialize($phpClass);
     $phpClass2 = unserialize($serialized);
     $this->assertSame($fullQualifiedNamespace, $phpClass2->getFullQualifiedNamespace());
 }