/** * @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")); }
/** * @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()); }