/** * Test the get of all the containers * * @return void */ public function testGetContainers() { $this->_files->getHttpClient() ->setAdapter($this->_httpClientAdapterTest); $this->_httpClientAdapterTest->setResponse($this->_loadResponse('../../_files/testAuthenticate')); $this->assertTrue($this->_files->authenticate(),'Authentication failed'); $this->_httpClientAdapterTest->setResponse($this->_loadResponse(__FUNCTION__)); $containers= $this->_files->getContainers(); $this->assertTrue($this->_files->isSuccessful(),'Get containers failed'); $this->assertEquals($this->_files->getCountContainers(),3,'Total containers count is wrong'); $this->assertEquals($this->_files->getSizeContainers(),27809,'Total objects size is wrong'); $this->assertEquals($this->_files->getCountObjects(),6,'Total objects count is wrong'); $this->assertEquals($containers[1]->getName(),'foo'); $this->assertEquals($containers[1]->getObjectCount(),2); $this->assertEquals($containers[1]->getSize(),9756); $this->assertEquals($containers[2]->getName(),'test'); $this->assertEquals($containers[2]->getObjectCount(),3); $this->assertEquals($containers[2]->getSize(),17839); }
public function testGetSizeContainers() { $size = $this->rackspace->getSizeContainers(); $this->assertTrue($size !== false); $this->assertTrue(is_int($size)); }