/** * Test finding one vacancy by id. */ public function testFind() { $repository = new VacancyRepository(array($this->source1, $this->source2)); $vacancyId = 1; $this->assertEquals($this->vacancy1, $repository->find($vacancyId)); }
<?php require_once __DIR__ . '/vendor/autoload.php'; use Netwerven\VacancyRepository; use Netwerven\Sources\DummySource; $repository = new VacancyRepository(array(new DummySource())); $id = 125; $vacancy = $repository->find($id); var_dump($vacancy); $vacancies = $repository->findAll(); var_dump($vacancies);