예제 #1
0
 /**
  * Работа с шагами
  */
 public function testStep()
 {
     /** @var Step $currentStep */
     $currentStep = $this->getMock(Step::class);
     static::assertEquals($this->entry, $this->entry->addCurrentStep($currentStep));
     static::assertEquals($this->entry, $this->entry->addCurrentStep($currentStep));
     static::assertEquals($this->entry, $this->entry->addCurrentStep($currentStep));
     static::assertEquals($currentStep, $this->entry->getSteps()->current());
     static::assertCount(1, $this->entry->getSteps());
 }
예제 #2
0
 /**
  * @param EntryInterface $entry
  *
  * @return $this
  */
 public function setEntry(EntryInterface $entry)
 {
     $this->entry = $entry;
     if (!$entry->getSteps()->contains($this)) {
         $entry->getSteps()->add($this);
     }
     return $this;
 }