restfulCollection = new RestfulCollection($entry, 1, 1); } /** * Cleans up the environment after running a test. */ protected function tearDown() { $this->restfulCollection = null; parent::tearDown(); } /** * Constructs the test case. */ public function __construct() {} /** * Tests RestfulCollection->__construct() */ public function test__construct() { $entry = array('Entry'); $this->restfulCollection->__construct($entry, 1, 1); } /** * Tests RestfulCollection->getEntry() */ public function testGetEntry() { $entry = array('Entry'); $this->restfulCollection->setEntry($entry); $this->assertEquals($entry, $this->restfulCollection->getEntry()); } /** * Tests RestfulCollection->getStartIndex() */ public function testGetStartIndex() { $this->restfulCollection->setStartIndex(1); $this->assertEquals(1, $this->restfulCollection->getStartIndex()); } /** * Tests RestfulCollection->getTotalResults() */ public function testGetTotalResults() { $this->restfulCollection->setTotalResults(1); $this->assertEquals(1, $this->restfulCollection->getTotalResults()); } /** * Tests RestfulCollection->createFromEntry() */ public function testCreateFromEntry() { $entry = array('Entry'); $restfulCollection = RestfulCollection::createFromEntry($entry); $this->assertEquals(1, $restfulCollection->getTotalResults()); $this->assertEquals($entry, $restfulCollection->getEntry()); $this->assertEquals(0, $restfulCollection->getStartIndex()); } }