function it_finds_matching_nodes(FieldNode $f1, FieldNode $f2) { $criteria = ['search' => 'criteria']; $f1->matches($criteria)->willReturn(false); $f2->matches($criteria)->willReturn(true); $this->findMatching($criteria)->shouldBeLike(new FieldCollection([$f2->getWrappedObject()])); }
function let(ResourceFetcher $fetcher, FieldNode $f1, FieldNode $f2, ResourceNode $resource) { $this->link = new Link($fetcher->getWrappedObject(), 'href'); $this->beConstructedWith(['field1' => $f1->getWrappedObject(), 'field2' => $f2->getWrappedObject()], ['link1' => $this->link], ['resource1' => $resource->getWrappedObject()]); }