Пример #1
0
 function it_finds_matching_nodes(ResourceNode $f1, ResourceNode $f2)
 {
     $criteria = ['search' => 'criteria'];
     $f1->matches($criteria)->willReturn(false);
     $f2->matches($criteria)->willReturn(true);
     $this->findMatching($criteria)->shouldBeLike(new ResourceCollection([$f2->getWrappedObject()]));
 }
Пример #2
0
 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()]);
 }