remove() public static method

Removing a configuration.
public static remove ( string $name )
$name string The name by which this connection is referenced.
Beispiel #1
0
 public function tearDown()
 {
     Connections::remove('mockconn');
     MockQueryPost::reset();
     MockQueryComment::reset();
     MockGallery::reset();
     MockImage::reset();
     MockImageTag::reset();
     MockTag::reset();
 }
Beispiel #2
0
 public function tearDown()
 {
     Connections::remove('mocksource');
     Connections::remove('mockconn');
     MockPost::reset();
     MockTag::reset();
     MockComment::reset();
     MockCreator::reset();
     MockSubProduct::reset();
     MockProduct::reset();
     MockPostForValidates::reset();
 }
Beispiel #3
0
 public function tearDown()
 {
     Connections::remove('mockconn');
     MockDatabasePost::reset();
     MockDatabaseComment::reset();
     MockDatabaseTagging::reset();
     MockDatabasePostRevision::reset();
     MockGallery::reset();
     MockImage::reset();
     MockImageTag::reset();
     MockTag::reset();
 }
Beispiel #4
0
 public function testConnectionRemove()
 {
     $result = Connections::add('conn-to-remove', array('type' => 'Mock') + $this->config);
     $expected = $this->config + array('type' => 'Mock');
     $this->assertEqual($expected, $result);
     $result = Connections::get('conn-to-remove');
     $this->assertInstanceOf('lithium\\data\\source\\Mock', $result);
     Connections::remove('conn-to-remove');
     $result = Connections::get('conn-to-remove');
     $this->assertNull($result);
 }
Beispiel #5
0
 public function tearDown()
 {
     Connections::remove('mockconn');
     MockDocumentPost::reset();
 }
Beispiel #6
0
 public function tearDown()
 {
     Connections::remove('mockconn');
     MockCouchPost::reset();
 }
Beispiel #7
0
 public function tearDown()
 {
     Connections::remove('mock');
     MockDatabasePost::reset();
 }
Beispiel #8
0
 public function testGridFsDeleteWithCustomPrefix()
 {
     $data = array('_id' => new MongoId());
     $db = new MongoDb($this->_testConfig + array('gridPrefix' => 'custom'));
     $db->server = new MockMongoConnection();
     $db->connection = new MockMongoConnection();
     Connections::add('temp', array('object' => $db));
     MockMongoPost::config(array('meta' => array('source' => 'fs.files', 'connection' => 'temp')));
     MockMongoPost::create($data, array('exists' => true))->delete();
     $this->assertIdentical(null, $db->connection->gridFsPrefix);
     MockMongoPost::config(array('meta' => array('source' => 'custom.files')));
     MockMongoPost::create($data, array('exists' => true))->delete();
     $this->assertIdentical('custom', $db->connection->gridFsPrefix);
     Connections::remove('temp');
 }
 public function testDown()
 {
     Connections::remove('mockconn');
     MockGallery::reset();
     MockImage::reset();
 }