/** * @test * @group bookservice */ public function should_return_empty_set_when_no_books_are_found() { $orgId = 1; $collection = new ArrayCollection(); $this->orgRepo->shouldReceive('organizationOfId')->with($orgId)->andReturn($this->klimtoren); $this->bookRepo->shouldReceive('all')->with($this->klimtoren)->andReturn($collection); $books = $this->bookService->all($orgId); $this->assertEmpty($books); }
public function isbn($orgId, $isbn) { $book = $this->bookService->bookOfIsbn($orgId, $isbn); return $this->jsonResponse($book); }