Example #1
0
 /**
  * @test
  */
 public function doesNotDependOnStore()
 {
     $store = new Store("identity_card");
     $aSecondStore = new Store("profile_network");
     $aThirdStore = new Store("profile_friends");
     $store->addTriggeredByStore($aSecondStore);
     // aSecondStore => store but aThirdStore is not wired
     $this->assertThat($store->dependsOnStore($aThirdStore), $this->isFalse());
 }
Example #2
0
 /**
  * @test
  * @expectedException \Wizbii\PipelineBundle\Exception\CircularPipelineException
  */
 public function circularReferencesThrowsException()
 {
     $pipeline = new Pipeline("wizbii_profile");
     $profileIdentityCardStore = new Store("profile_identity_card");
     $profileNetworkStore = new Store("profile_network");
     $profileThanxStore = new Store("profile_thanx");
     $profileIdentityCardStore->addTriggeredByStore($profileNetworkStore);
     $profileNetworkStore->addTriggeredByStore($profileThanxStore);
     $profileThanxStore->addTriggeredByStore($profileIdentityCardStore);
     $pipeline->addStore($profileIdentityCardStore);
     $pipeline->addStore($profileNetworkStore);
     $pipeline->addStore($profileThanxStore);
     $pipeline->checkForCircularReferences();
 }