Ejemplo n.º 1
0
 /**
  * Test remove IDs
  */
 public function testRemove()
 {
     $this->assertEquals(1, $this->accounts->getNextId());
     $this->assertEquals(0, $this->accounts->count());
     $this->accounts->insert(['license_key' => '123', 'subdomain' => 'afiveone', 'url' => 'https://www.activecollab.com'], ['license_key' => '456', 'subdomain' => 'feather', 'url' => 'https://www.activecollab.com'], ['license_key' => '789', 'subdomain' => 'supportyard', 'url' => 'https://www.activecollab.com']);
     $this->assertEquals(3, $this->accounts->count());
     $this->assertEquals([1, 2, 3], $this->accounts->getIds());
     $this->accounts->delete(2);
     $this->assertEquals(2, $this->accounts->count());
     $this->assertEquals([1, 3], $this->accounts->getIds());
 }