Пример #1
0
 /**
  * Activate the plugin, mock all the things
  */
 public function setUp()
 {
     parent::setUp();
     /**
      * Start the framework
      */
     _action_init_framework();
 }
Пример #2
0
 /**
  * Activate the plugin, mock all the things
  */
 public function setUp()
 {
     parent::setUp();
     if (!function_exists('fw_fix_path')) {
         /**
          * Start the framework
          */
         _action_init_framework();
     }
 }
Пример #3
0
<?php

if (!function_exists('fw_fix_path')) {
    _action_init_framework();
}
class Test_Option_Type extends FW_Option_Type
{
    public function get_type()
    {
        return 'test-option-type';
    }
    protected function _enqueue_static($id, $option, $data)
    {
    }
    protected function _render($id, $option, $data)
    {
        return '';
    }
    protected function _get_value_from_input($option, $input_value)
    {
        return (string) (is_null($input_value) ? $option['value'] : $input_value);
    }
    protected function _get_defaults()
    {
        return array('random-key' => '', 'value' => 'default-val');
    }
}
class TestsUnysonOptionTypes extends WP_Unyson_UnitTestCase
{
    public function setUp()
    {