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'); }
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; } }