public function testFixturizer() { $fixter = new RedisFixts(); $fixter->createFixtures(); $this->module->setConnection('local', 1); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_string'])); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_hash'])); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_list'])); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_set'])); $this->assertEquals(1, $this->module->executeCommand('EXISTS', ['tfx_zset'])); $this->assertEquals(-1, $this->module->executeCommand('TTL', ['tfx_hash'])); $this->assertNotEquals(-1, $this->module->executeCommand('TTL', ['tfx_stringexp'])); $this->assertNotEquals(-1, $this->module->executeCommand('TTL', ['tfx_listexp'])); $fixter->deleteFixtures(); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_string'])); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_hash'])); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_list'])); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_set'])); $this->assertEquals(0, $this->module->executeCommand('EXISTS', ['tfx_zset'])); }
protected function tearDown() { $fixter = new RedisFixts(); $fixter->deleteFixtures(); parent::tearDown(); }