示例#1
0
 public function testTargetConstructorDefaults()
 {
     $targetData = ['name' => 'name', 'namespace' => 'Namespace'];
     $target = new Target($targetData);
     $this->assertEquals(false, $target->isWithAnnotations(), 'withAnnotations');
     $this->assertEquals(false, $target->isUseClassNotations(), 'useClassNotations');
     $this->assertEquals(false, $target->isWithInitFunction(), 'withInitFunction');
 }
示例#2
0
 public function __construct(Logger $logger, $sourceNamespace, array $targets = [])
 {
     $this->logger = $logger;
     $this->namespace = $sourceNamespace;
     $this->targets = [];
     foreach ($targets as $target) {
         if (!$target instanceof Target) {
             $target = new Target($target);
         }
         $this->targets[$target->getName()] = $target;
     }
 }