hasState() public method

public hasState ( $name )
コード例 #1
0
 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'));
 }
コード例 #2
0
ファイル: Process.php プロジェクト: jiangyu7408/Statemachine
 /**
  * @param string $name
  *
  * @return boolean
  */
 public function hasState($name)
 {
     return $this->states->hasState($name);
 }