public function setUp()
 {
     if (!array_search('string', stream_get_wrappers())) {
         stream_wrapper_register('string', 'phpillowToolStringStream');
     }
     phpillowTestEnvironmentSetup::resetDatabase(array('database' => 'test'));
 }
 public function setUp()
 {
     phpillowTestEnvironmentSetup::resetDatabase(array('database' => 'test'));
 }
 public function setUp()
 {
     phpillowTestEnvironmentSetup::resetDatabase(array('database' => 'test'));
     phpillowManager::setDocumentClass('user', 'phpillowUserDocument');
 }
Пример #4
0
 public function setUp()
 {
     phpillowTestEnvironmentSetup::resetDatabase(array('database' => 'test'));
     $this->insertData($this->dataArray);
 }
 public function testHttpLog()
 {
     phpillowTestEnvironmentSetup::resetDatabase(array('database' => 'test', 'handler' => 'phpillowStreamConnection'));
     $db = phpillowConnection::getInstance();
     $db->setOption('http-log', $logFile = tempnam(dirname(__FILE__) . '/../temp', __CLASS__));
     $response = $db->put('/test/123', '{"_id":"123","data":"Foo"}');
     $response = $db->get('/test/123');
     $this->assertTrue(filesize($logFile) > 128);
 }
 /**
  * Reset database connection after each test run
  *
  * @return void
  */
 public function tearDown()
 {
     phpillowTestEnvironmentSetup::resetDatabase();
     phpillowTestEnvironmentSetup::resetTmpDir();
 }