コード例 #1
0
ファイル: PartnerTest.php プロジェクト: crlang44/frapi
 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');
 }
コード例 #2
0
ファイル: InternalTest.php プロジェクト: crlang44/frapi
 /**
  * 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]);
     }
 }
コード例 #3
0
ファイル: Xml.php プロジェクト: reith2004/frapi
    /**
     * 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,
            )
        );
    }