コード例 #1
0
ファイル: ActionTest.php プロジェクト: wizbii/pipeline
 /**
  * @test
  */
 public function hasProperty()
 {
     $action = new Action("profile_updated");
     $action->addProperty("profile_slug", "benjamin_ducousso");
     $this->assertThat($action->hasProperty("profile_slug"), $this->isTrue());
     $this->assertThat($action->getProperty("profile_slug"), $this->equalTo("benjamin_ducousso"));
 }
コード例 #2
0
ファイル: ActionMatcherTest.php プロジェクト: wizbii/pipeline
 /**
  * @test
  */
 public function doesNotMatchOnPropertyName()
 {
     $actionMatcher = new ActionMatcher();
     $actionMatcher->addMatcherOnPropertyName("hello")->addMatcher(new Is("world"));
     $action = new Action("foo");
     $action->addProperty("hello", "john");
     $this->assertThat($actionMatcher->matches($action), $this->isFalse());
 }