public function testWhenNoItems_emptyListIsReturned()
 {
     $useCase = TestEnvironment::newInstance()->getFactory()->newListItemsUseCase();
     $request = new ItemListingRequest();
     $request->setPerPage(100);
     $request->setPage(1);
     $this->assertEquals(new ItemList([]), $useCase->listItems($request));
 }
 public function testWithWikipediaHtmlUrl()
 {
     $serializer = TestEnvironment::newInstance()->getFactory()->newSimpleItemSerializer();
     $simpleItem = $this->newSimpleItem();
     $simpleItem->wikipediaHtmlUrl = 'http://wikipedia';
     $expected = $this->newSimpleItemSerialization();
     $expected['wikipedia_html_url'] = 'http://wikipedia';
     $this->assertEquals($expected, $serializer->serialize($simpleItem));
 }
 public function setUp()
 {
     $this->apiFactory = TestEnvironment::newInstance()->getFactory();
 }
 public function setUp()
 {
     $this->testEnvironment = TestEnvironment::newInstance();
     $this->apiFactory = $this->testEnvironment->getFactory();
     parent::setUp();
 }