示例#1
0
 /**
  * Sets up the fixture, for example, opens a network connection.
  * This method is called before a test is executed.
  */
 protected function setUp()
 {
     $data = (object) array();
     $this->gacela = \Gacela\Gacela::instance();
     $m = $this->gacela->loadMapper('Test');
     $this->object = new Test\Model\Test(get_class($m), $data);
 }
示例#2
0
 /**
  * @param $name
  * @param $expected
  * @dataProvider providerMapper
  */
 public function testLoadMapperWithMemcache($name, $expected)
 {
     $expected = str_replace('\\', '_', $expected);
     $this->assertFalse($this->memcache->get($expected));
     $this->object->enableCache($this->memcache);
     $mapper = $this->object->loadMapper($name);
     $this->assertEquals($mapper, $this->memcache->get($expected));
 }