protected function getObject(\Nethgui\Test\Tool\DB $db)
 {
     $tableAdapter = new \Nethgui\Adapter\TableAdapter(MockFactory::getMockDatabase($this, $db), 'T', FALSE);
     return new RecordAdapterTester($tableAdapter);
 }
 public function testSave1()
 {
     $e = new \ArrayObject(array('2K' => new \ArrayObject(array('2P' => '2V', '2Q' => '2W')), '3K' => new \ArrayObject(array('3P' => '3V', '3Q' => '3W'))));
     $this->object = new \Nethgui\Adapter\TableAdapter(MockFactory::getMockDatabase($this, $this->getDB()->set(DB::deleteKey("1K"), $e)), 'T', FALSE);
     $this->assertFalse($this->object->isModified());
     unset($this->object['1K']);
     $this->assertTrue($this->object->isModified());
     $c = $this->object->save();
     $this->assertEquals(1, $c);
     $this->assertFalse($this->object->isModified());
     $this->assertFalse(isset($this->object['1K']));
 }
 private function getSubject($username = FALSE, $groups = array())
 {
     return \Nethgui\Test\Tool\MockFactory::getAuthenticationSubject($this, $username, $groups);
 }
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $this->mockDb = $this->getInitialDb();
     $this->object = new \Nethgui\Adapter\TableAdapter(MockFactory::getMockDatabase($this, $this->mockDb));
 }