Skip to content

Commit

Permalink
Add unit tests to verify that an endpoint list items
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineAugusti committed Aug 24, 2014
1 parent 7290c16 commit a58bcce
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/Antoineaugusti/LaravelEasyrec/EasyrecTestRankings.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public function testMostViewedItems()

// Test the endpoint name
$this->assertEquals('mostvieweditems', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testMostViewedItemsNbResultsException()
Expand Down Expand Up @@ -50,6 +51,7 @@ public function testMostBoughtItems()

// Test the endpoint name
$this->assertEquals('mostboughtitems', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testMostBoughtItemsNbResultsException()
Expand Down Expand Up @@ -80,6 +82,7 @@ public function testMostRatedItems()

// Test the endpoint name
$this->assertEquals('mostrateditems', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testMostRatedItemsNbResultsException()
Expand Down Expand Up @@ -110,6 +113,7 @@ public function testBestRatedItems()

// Test the endpoint name
$this->assertEquals('bestrateditems', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testBestRatedItemsNbResultsException()
Expand Down Expand Up @@ -140,6 +144,7 @@ public function testWorstRatedItems()

// Test the endpoint name
$this->assertEquals('worstrateditems', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testWorstRatedItemsNbResultsException()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function testUsersAlsoViewed()

// Test the endpoint name
$this->assertEquals('otherusersalsoviewed', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testUsersAlsoViewedException()
Expand Down Expand Up @@ -55,6 +56,7 @@ public function testUsersAlsoBought()

// Test the endpoint name
$this->assertEquals('otherusersalsobought', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testUsersAlsoBoughtException()
Expand Down Expand Up @@ -84,6 +86,7 @@ public function testRatedGoodByOther()

// Test the endpoint name
$this->assertEquals('itemsratedgoodbyotherusers', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testRatedGoodByOtherException()
Expand Down Expand Up @@ -113,6 +116,7 @@ public function testRecommendationsForUser()

// Test the endpoint name
$this->assertEquals('recommendationsforuser', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testRecommendationsForUserException()
Expand Down Expand Up @@ -142,6 +146,7 @@ public function testActionHistoryForUser()

// Test the endpoint name
$this->assertEquals('actionhistoryforuser', $this->easyrec->getEndpoint());
$this->assertTrue($this->easyrec->doesEndpointListItems());
}

public function testActionHistoryForUserException()
Expand Down

0 comments on commit a58bcce

Please sign in to comment.