X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=vendor%2Fdrush%2Fdrush%2Ftests%2FxhUnitTest.php;fp=vendor%2Fdrush%2Fdrush%2Ftests%2FxhUnitTest.php;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=1a95078271d25f060f18b724528f3a4802a630c9;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/drush/drush/tests/xhUnitTest.php b/vendor/drush/drush/tests/xhUnitTest.php deleted file mode 100644 index 1a9507827..000000000 --- a/vendor/drush/drush/tests/xhUnitTest.php +++ /dev/null @@ -1,108 +0,0 @@ - $option_value) { - drush_set_option($option_name, $option_value); - } - $this->assertEquals($expected, xh_flags(), $name); - } - - /** - * Provides drush XHProf options and the results we expect from xh_flags(). - */ - public function xhOptionProvider() { - - if (!defined('XHPROF_FLAGS_NO_BUILTINS')) { - define('XHPROF_FLAGS_NO_BUILTINS', 1); - define('XHPROF_FLAGS_CPU', 2); - define('XHPROF_FLAGS_MEMORY', 3); - } - - return array( - array( - 'name' => 'No flag options provided (default)', - 'options' => array(), - 'expected' => 0, - ), - array( - 'name' => 'Default flag options explicitly provided', - 'options' => array( - 'xh-profile-builtins' => TRUE, - 'xh-profile-cpu' => FALSE, - 'xh-profile-memory' => FALSE, - ), - 'expected' => 0, - ), - array( - 'name' => 'Disable profiling of built-ins', - 'options' => array( - 'xh-profile-builtins' => FALSE, - 'xh-profile-cpu' => FALSE, - 'xh-profile-memory' => FALSE, - ), - 'expected' => XHPROF_FLAGS_NO_BUILTINS, - ), - array( - 'name' => 'Enable profiling of CPU', - 'options' => array( - 'xh-profile-builtins' => TRUE, - 'xh-profile-cpu' => TRUE, - 'xh-profile-memory' => FALSE, - ), - 'expected' => XHPROF_FLAGS_CPU, - ), - array( - 'name' => 'Enable profiling of CPU, without builtins', - 'options' => array( - 'xh-profile-builtins' => FALSE, - 'xh-profile-cpu' => TRUE, - 'xh-profile-memory' => FALSE, - ), - 'expected' => XHPROF_FLAGS_NO_BUILTINS | XHPROF_FLAGS_CPU, - ), - array( - 'name' => 'Enable profiling of Memory', - 'options' => array( - 'xh-profile-builtins' => TRUE, - 'xh-profile-cpu' => FALSE, - 'xh-profile-memory' => TRUE, - ), - 'expected' => XHPROF_FLAGS_MEMORY, - ), - array( - 'name' => 'Enable profiling of Memory, without builtins', - 'options' => array( - 'xh-profile-builtins' => FALSE, - 'xh-profile-cpu' => FALSE, - 'xh-profile-memory' => TRUE, - ), - 'expected' => XHPROF_FLAGS_NO_BUILTINS | XHPROF_FLAGS_MEMORY, - ), - array( - 'name' => 'Enable profiling of CPU & Memory', - 'options' => array( - 'xh-profile-builtins' => TRUE, - 'xh-profile-cpu' => TRUE, - 'xh-profile-memory' => TRUE, - ), - 'expected' => XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY, - ), - ); - } - -}