Exemplo n.º 1
0
 /** @var Specification */
 public function getPageSpecification()
 {
     $isAMailtoLinkSpec = new IsAMailtoLinkSpecification();
     $blacklistedPageSpec = new BlacklistedPageSpecification($this->pageBlacklist);
     $whitelistedDomainSpec = new WhitelistedDomainSpecification($this->domainWhitelist);
     return $isAMailtoLinkSpec->not_()->and_($blacklistedPageSpec->not_())->and_($whitelistedDomainSpec);
 }
 /** @test */
 public function DoesNotMatchNormalLinks()
 {
     $specification = new IsAMailtoLinkSpecification();
     $page = new Page('http://foobar/');
     $this->assertFalse($specification->isSatisfiedBy($page));
 }