Exemplo n.º 1
0
 public function testIsPartnerExpectTrue()
 {
     $partner = array('*****@*****.**' => array('email' => '*****@*****.**', 'api_key' => 'e5b9e917648c57a978ba633095cb7a12fb0a647e'));
     Frapi_Internal::setCached('Partners.emails-keys', $partner);
     $partner = Frapi_Model_Partner::isPartner('*****@*****.**', 'e5b9e917648c57a978ba633095cb7a12fb0a647e');
     $this->assertTrue($partner);
     Frapi_Internal::deleteCached('Partners.emails-keys');
 }
Exemplo n.º 2
0
 /**
  * Tear Down - delete APC keys used in tests.
  *
  * @return void
  **/
 protected function tearDown()
 {
     $kvs = $this->keysValuesProvider();
     foreach ($kvs as $arr) {
         Frapi_Internal::deleteCached($arr[0]);
         //            apc_delete($arr[0]);
     }
 }
Exemplo n.º 3
0
    /**
     * Save the new configuration
     *
     * This method saves the newly updated configuration. Please note
     * that at it's basic stage, the config files have a <config> root
     * node, however after saving using the Zend_Config_Writer_Xml, the
     * root node becomes <zend-config>.
     *
     * Don't worry about it, the parser won't see a difference.
     *
     * @throws Zend_Exception
     * @uses   Zend_Config_Writer_Xml
     * @return bool True of false whether the saving of the file worked or not.
     */
    protected function save()
    {
        $this->configIsWriteable();

        $helper = new Lupin_Config_Helper_XmlArray();

        Frapi_Internal::deleteCached('configFile-' . $this->configName);

        return $helper->write(
            array(
                'config'       => $this->config,
                'filename'     => $this->configFile,
                'topLevelName' => $this->configName,
            )
        );
    }