Example #1
0
 /**
  * @test
  */
 public function isTriggeredByAction()
 {
     $store = new Store("identity_card");
     $action = new Action("first_name_updated");
     $store->addTriggeredByAction($action);
     $this->assertThat($store->isNeverTriggered(), $this->isFalse());
     $this->assertThat($store->isTriggeredByAction($action), $this->isTrue());
 }
Example #2
0
 /**
  * @test
  */
 public function storeIsNotRunnable()
 {
     // init container
     $container = new Container();
     $this->actionDispatcher->container = $container;
     // init pipeline
     $action = new Action("profile_created");
     $store = new Store("profile_network");
     $store->setService("pipeline.store.profile.dashboard");
     $store->addTriggeredByAction($action);
     $pipeline = new Pipeline();
     $pipeline->addStore($store);
     $this->actionDispatcher->pipelineProvider->setPipeline($pipeline);
     // dispatch action
     $returnedValue = $this->actionDispatcher->dispatch($action);
     $this->assertThat($returnedValue, $this->isFalse());
 }