hasState() public method

public hasState ( $name )
 public function testCreatesAllStatesFromSourceAtTargetColletions()
 {
     $targetCollection = new StateCollection();
     $merger = new StateCollectionMerger($targetCollection);
     $sourceCollection = $this->createSourceCollection();
     $this->assertFalse($targetCollection->hasState('new'));
     $this->assertFalse($targetCollection->hasState('in progress'));
     $this->assertFalse($targetCollection->hasState('done'));
     $merger->merge($sourceCollection);
     $this->assertTrue($targetCollection->hasState('new'));
     $this->assertTrue($targetCollection->hasState('in progress'));
     $this->assertTrue($targetCollection->hasState('done'));
 }
Example #2
0
 /**
  * @param string $name
  *
  * @return boolean
  */
 public function hasState($name)
 {
     return $this->states->hasState($name);
 }