Skip to content

Commit

Permalink
Convert all tests over to new create wall behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
birtles committed Mar 19, 2013
1 parent 97698e5 commit 944c19f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions wall/tests/api/TestGetWall.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ function __construct($name = false) {
function testLoggedOut() { function testLoggedOut() {
// Create wall // Create wall
$this->login(); $this->login();
$wallId = $this->createWall('Test wall', $this->testDesignId); $wall = $this->_createWall('Test wall', $this->testDesignId);
$wallId = $wall['wallId'];
$this->logout(); $this->logout();


// Check it fails if we're logged out // Check it fails if we're logged out
Expand All @@ -34,7 +35,8 @@ function testLoggedOut() {
function testGetWall() { function testGetWall() {
// Create wall // Create wall
$this->login(); $this->login();
$wallId = $this->createWall('Test wall', $this->testDesignId); $wall = $this->_createWall('Test wall', $this->testDesignId);
$wallId = $wall['wallId'];


// Check it succeeds // Check it succeeds
$wall = $this->getWall($wallId); $wall = $this->getWall($wallId);
Expand Down
3 changes: 2 additions & 1 deletion wall/tests/api/TestUserSummary.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ function testWalls() {
count($summary['walls']) === 0, count($summary['walls']) === 0,
"Should have got an empty list of walls"); "Should have got an empty list of walls");


$wallId = $this->createWall('Test wall', $this->testDesignId); $wall = $this->_createWall('Test wall', $this->testDesignId);
$wallId = $wall['wallId'];
$summary = $this->getMySummary(); $summary = $this->getMySummary();
$this->assertTrue(count($summary['walls']) === 1, $this->assertTrue(count($summary['walls']) === 1,
"Should have got one wall back"); "Should have got one wall back");
Expand Down

0 comments on commit 944c19f

Please sign in to comment.