/** * Tests the visitor accept method. * * @return void */ public function testVisitorAccept() { $class = new PHP_Depend_Code_Class(__CLASS__); $visitor = new PHP_Depend_Visitor_TestNodeVisitor(); $class->accept($visitor); self::assertSame($class, $visitor->class); }
/** * Tests the visitor accept method. * * @return void * @covers PHP_Depend_Code_AbstractClassOrInterface * @covers PHP_Depend_Code_Class * @group pdepend * @group pdepend::code * @group unittest */ public function testVisitorAccept() { $class = new PHP_Depend_Code_Class('clazz', 0); $visitor = new PHP_Depend_Visitor_TestNodeVisitor(); $class->accept($visitor); $this->assertSame($class, $visitor->class); }