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()); } }