User:Nam

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 
=Introduction=
 
=Introduction=
 +
 +
 +
=Wordpress test suite=
 
Just getting the wordpress tests running on zend php was a challenge in itself.  Ran into the following problems:
 
Just getting the wordpress tests running on zend php was a challenge in itself.  Ran into the following problems:
 
* any fatal failure prevents rest of tests from running
 
* any fatal failure prevents rest of tests from running
Line 9: Line 12:
 
All in all, I had to delete about 70 borked tests.
 
All in all, I had to delete about 70 borked tests.
  
=Wordpress test suite=
 
 
==Running wordpress tests on zend php==
 
==Running wordpress tests on zend php==
 
# svn checkout http://svn.automattic.com/wordpress-tests
 
# svn checkout http://svn.automattic.com/wordpress-tests

Revision as of 00:00, 25 February 2012

Contents

Introduction

Wordpress test suite

Just getting the wordpress tests running on zend php was a challenge in itself. Ran into the following problems:

  • any fatal failure prevents rest of tests from running
  • does not list the currently running test nor file
  • some tests are using new wordpress features not checked into trunk
  • some tests have recent input data changes, but expected outputs were not updated in tandem
  • hopeless trying to run tests on non-trunk wordpress-3.3.1

All in all, I had to delete about 70 borked tests.

Running wordpress tests on zend php

  1. svn checkout http://svn.automattic.com/wordpress-tests
  2. sudo cp /etc/php.ini.default /etc/php.ini
  3. curl http://pear.php.net/go-pear | sudo php
    • update php.ini - yes
  4. add pear to PATH (optional)
  5. sudo pear channel-discover pear.phpunit.de
  6. sudo pear install phpunit/PHPUnit
  7. cp wordpress-tests/wp-config-sample.php wordpress-tests/wp-config.php
  8. edit wp-config.php with test database settings
  9. delete the bad tests from wordpress-tests/wp-testcase/test-xmlrpc-api
  10. php wordpress-tests php -l

Wordpress test results

zend php - wordpress trunk

 Tests: 758, Assertions: 4684, Failures: 60, Skipped: 41.

PHPUnit

php classes used by PHPUnit

  1. Countable
  2. DOMXPath
  3. Exception
  4. InvalidArgumentException
  5. ReflectionClass
  6. ReflectionMethod
  7. ReflectionObject
  8. ReflectionProperty
  9. RuntimeException
  10. SOAPClient

php functions used by PHPUnit

  1. TestCase
  2. abs
  3. accept
  4. addFileToBlacklist
  5. addFileToWhitelist
  6. addcslashes
  7. appendChild
  8. argument
  9. array_key_exists
  10. array_keys
  11. array_merge
  12. array_pop
  13. array_push
  14. array_reverse
  15. array_shift
  16. array_unique
  17. array_unshift
  18. array_values
  19. attach
  20. basename
  21. bin2hex
  22. call_user_func_array
  23. className
  24. class_exists
  25. clearstatcache
  26. constant
  27. debug_backtrace
  28. define
  29. defined
  30. dirname
  31. dump
  32. each
  33. empty
  34. error_reporting
  35. escapeshellcmd
  36. eval
  37. exception
  38. exit
  39. fclose
  40. fflush
  41. file
  42. file_exists
  43. file_get_contents
  44. file_iterator_autoload
  45. file_put_contents
  46. filter
  47. fopen
  48. fsockopen
  49. func_get_args
  50. func_num_args
  51. fwrite
  52. getAttribute
  53. getClass
  54. getCode
  55. getConstructor
  56. getDeclaringClass
  57. getDefaultValue
  58. getDocComment
  59. getElementsByTagName
  60. getEndLine
  61. getExtensionName
  62. getFile
  63. getFileName
  64. getFilesAsArray
  65. getInfo
  66. getLine
  67. getMethod
  68. getParameters
  69. getParentClass
  70. getProperty
  71. getStartLine
  72. getStaticProperties
  73. getTrace
  74. getValue
  75. get_class
  76. get_class_methods
  77. get_declared_classes
  78. get_defined_vars
  79. get_include_path
  80. get_included_files
  81. gettype
  82. handler
  83. hasProperty
  84. htmlspecialchars
  85. in_array
  86. ini_set
  87. interface_exists
  88. isAbstract
  89. isCloneable
  90. isConstructor
  91. isFinal
  92. isInstantiable
  93. isPublic
  94. isStatic
  95. isUserDefined
  96. is_array
  97. is_bool
  98. is_callable
  99. is_dir
  100. is_double
  101. is_file
  102. is_float
  103. is_infinite
  104. is_int
  105. is_integer
  106. is_nan
  107. is_null
  108. is_numeric
  109. is_object
  110. is_readable
  111. is_resource
  112. is_scalar
  113. is_string
  114. isset
  115. item
  116. iterator_count
  117. join
  118. json_encode
  119. libxml_get_errors
  120. libxml_use_internal_errors
  121. list
  122. loadHTML
  123. loadXML
  124. mb_convert_encoding
  125. method_exists
  126. microtime
  127. min
  128. newInstance
  129. newInstanceArgs
  130. normalizeDocument
  131. notifyMethod
  132. ob_end_clean
  133. ob_get_clean
  134. ob_get_contents
  135. ob_start
  136. ord
  137. php_codecoverage_autoload
  138. php_invoker_autoload
  139. php_timer_autoload
  140. php_tokenstream_autoload
  141. phpunit_dbunit_autoload
  142. phpunit_selenium_autoload
  143. phpunit_story_autoload
  144. preg_match
  145. print_r
  146. proc_close
  147. realpath
  148. removeChild
  149. removeFileFromBlacklist
  150. removeFileFromWhitelist
  151. render
  152. reset
  153. resourceUsage
  154. restore_error_handler
  155. saveXML
  156. serialize
  157. setCacheTokens
  158. setlocale
  159. settype
  160. sfYamlDumper
  161. sizeof
  162. sort
  163. spl_object_hash
  164. start
  165. stream_get_contents
  166. stream_resolve_include_path
  167. stripos
  168. strlen
  169. strpos
  170. strstr
  171. strtolower
  172. strtoupper
  173. substr
  174. substr_count
  175. substr_replace
  176. suite
  177. sys_get_temp_dir
  178. testMethod
  179. text_template_autoload
  180. trait_exists
  181. trim
  182. ucfirst
  183. unlink
  184. unserialize
  185. unset
  186. utf8_encode
  187. var_export
  188. version_compare
  189. withAnyParamers
Personal tools