public function testItemId() { $expected = 'item123'; $this->assertNull($this->item->getItemId()); $this->assertSame($this->item, $this->item->setItemId($expected)); $this->assertEquals($expected, $this->item->getItemId()); }
/** * Resets an item's score to zero * * @param Item|string $item an Item model or itemId * @return void */ public function resetItemScore($item) { $itemId = $item instanceof Item ? $item->getItemId() : $item; $this->connect('PUT', new Route(self::ITEM_RESET_SCORE_ROUTE, ['itemId' => $itemId])); }