Skip to content

Commit

Permalink
Update PutTest.php
Browse files Browse the repository at this point in the history
New tests to check removing from the PUT array
  • Loading branch information
devjack committed Nov 15, 2013
1 parent 4534513 commit 02ebd37
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/Http/Tests/Methods/PutTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,18 @@ public function testArrayRead()

$this->assertEquals("value", (new Put($requestBody))->offsetGet("key"));
}

/**
* Test array offset unsets
*/
public function testArrayRemove()
{
$requestBody = json_encode(array("key"=>"value"));
(new Put($requestBody))->globalize();
global $_PUT;

$this->setExpectedException('\ErrorException');

unset($_PUT['joe']);
}
}

0 comments on commit 02ebd37

Please sign in to comment.