Example #1
0
 /**
  * @todo Implement testSetAdapter().
  */
 public function testSetAdapter()
 {
     require_once JPATH_BASE . '/libraries/joomla/base/adapterinstance.php';
     $this->object = new JAdapter(dirname(__FILE__), 'Test', 'adapters');
     $this->object->setAdapter('Testadapter');
     $this->assertThat($this->object->getAdapter('Testadapter'), $this->isInstanceOf('TestTestadapter'));
     $this->assertThat($this->object->setAdapter('NoAdapterHere'), $this->isFalse());
     $this->assertThat($this->object->setAdapter('Testadapter2'), $this->isFalse());
 }
Example #2
0
 /**
  * @todo Implement testSetAdapter().
  */
 public function testSetAdapter()
 {
     require_once JPATH_PLATFORM . '/joomla/base/adapterinstance.php';
     $this->object = new JAdapter(JUnitHelper::normalize(dirname(__FILE__)), 'Test', 'TestAdapters');
     $this->object->setAdapter('Testadapter');
     $this->assertThat($this->object->getAdapter('Testadapter'), $this->isInstanceOf('TestTestadapter'));
     $this->assertThat($this->object->setAdapter('NoAdapterHere'), $this->isFalse());
     $this->assertThat($this->object->setAdapter('Testadapter2'), $this->isFalse());
 }