安装EcomDev_PHPUnit后测试失败

时间:2013-11-17 07:01:56

标签: magento testing phpunit

为了设置EcomDev_PHPUnit,我通过PEAR安装了PHPUnit和相关模块,当我为magento实例运行“phpunit”时,在32次测试中,14次失败,所有失败的测试都有类似的模式。关于如何解决这个问题的任何线索都会有所帮助。

=== 示例1

EcomDev_PHPUnitTest_Test_Lib_Constraint_Config_Resource_Script::testGetVersionScriptsDiff with data set "to_1.0.5_one_invalid" ('directory_one_invalid', 'scheme', NULL, '1.0.5')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
'expected' => Array (

0 => 'install-1.0.0.php'
1 => 'upgrade-1.0.0-1.0.1.php'
2 => 'upgrade-1.0.1-1.0.5.php'
0 => 'install-1.0.5.php' ) 'actual' => Array (
0 => 'upgrade-1.0.0-1.0.1.php' ) )

=== 示例2

EcomDev_PHPUnitTest_Test_Lib_Constraint_Config_Resource_Script::testParseVersions with data set "directory_one_invalid" ('directory_one_invalid')
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (
'scheme' => Array (
'install' => Array ()
'upgrade' => Array (

0 => Array (...) ) ) 'data' => Array (...) )

===示例3:

EcomDev_PHPUnitTest_Test_Lib_Constraint_Config_Resource_Script::testGetVersionScriptsDiff with data set "from_1.0.0_one" ('directory_one_valid', 'scheme', '1.0.0', NULL)
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
     'expected' => Array (
         0 => 'install-1.0.0.php'
-        1 => 'upgrade-1.0.0-1.0.1.php'
     )
     'actual' => Array (
-        0 => 'install-1.0.0.php'
-        1 => 'upgrade-1.0.0-1.0.1.php'
     )
 )

0 个答案:

没有答案