public function it_will_show_traits_in_imports(TraitType $trait1, TraitType $trait2) { $trait1->getFullName()->willReturn('TraitType1'); $trait2->getFullName()->willReturn('TraitType2'); $this->addTrait($trait1)->shouldReturn($this); $this->addTrait($trait2)->shouldReturn($this); $this->getImports()->shouldReturn([$trait1, $trait2]); }
protected function createTrait(TraitType $traitType) { return new TraitUse([new Name($traitType->getName())]); }