I am evaluating the feasibility of using unit testing for an upcoming
project. When I tried running the tests against the sample app, I got
the following errors. I don't have a trac account, so wasn't able to
file a ticket there.
P.S.: +1 for
AgaviBaseConstraintBecausePhpunitSucksAtBackwardsCompatibility naming. :)
Peace,
Shoan.
[shoan@nirvana:~/Sites/sandbox/agavi/1.0b/samples/test]$ php
run-tests.php PHPUnit 3.6.10 by Sebastian Bergmann.
......................................EEEEEE.E...F.
Time: 9 seconds, Memory: 14.75Mb
There were 7 errors:
1) Products_Product_ViewActionTest::testReadMethod
RuntimeException: Fatal error: Class
'AgaviBaseConstraintBecausePhpunitSucksAtBackwardsCompatibility' not
found in
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintActionHandlesMethod.php
on line 18
Call Stack:
0.0008 705608 1. {main}() -:0
0.0273 4096384 2. __phpunit_run_isolated_test() -:241
0.0402 6170848 3. PHPUnit_Framework_TestCase->run() -:36
0.0417 6328072 4. PHPUnit_Framework_TestResult->run()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:751
0.0431 6414952 5. PHPUnit_Framework_TestCase->runBare()
/opt/local/lib/php/PHPUnit/Framework/TestResult.php:649
0.0893 11402392 6. PHPUnit_Framework_TestCase->runTest()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:804
0.0893 11403856 7. ReflectionMethod->invokeArgs()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0893 11403888 8.
Products_Product_ViewActionTest->testReadMethod()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0893 11403968 9. AgaviActionTestCase->assertHandlesMethod()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewActionTest.php:115
0.0913 11450240 10. Agavi::__autoload()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewActionTest.php:0
0.0916 11471704 11.
require('/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintActionHandlesMethod.php')
/Users/shoan/Sites/sandbox/agavi/1.0b/src/core/Agavi.class.php:69
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/AgaviTesting.class.php:146
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/run-tests.php:21
2) Products_Product_ViewActionTest::testWriteMethod
RuntimeException: Fatal error: Class
'AgaviBaseConstraintBecausePhpunitSucksAtBackwardsCompatibility' not
found in
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintActionHandlesMethod.php
on line 18
Call Stack:
0.0008 705608 1. {main}() -:0
0.0287 4096384 2. __phpunit_run_isolated_test() -:241
0.0419 6170848 3. PHPUnit_Framework_TestCase->run() -:36
0.0435 6328072 4. PHPUnit_Framework_TestResult->run()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:751
0.0448 6414952 5. PHPUnit_Framework_TestCase->runBare()
/opt/local/lib/php/PHPUnit/Framework/TestResult.php:649
0.0923 11402392 6. PHPUnit_Framework_TestCase->runTest()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:804
0.0923 11403856 7. ReflectionMethod->invokeArgs()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0923 11403888 8.
Products_Product_ViewActionTest->testWriteMethod()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0924 11403968 9. AgaviActionTestCase->assertNotHandlesMethod()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewActionTest.php:120
0.0944 11450240 10. Agavi::__autoload()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewActionTest.php:0
0.0947 11471704 11.
require('/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintActionHandlesMethod.php')
/Users/shoan/Sites/sandbox/agavi/1.0b/src/core/Agavi.class.php:69
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/AgaviTesting.class.php:146
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/run-tests.php:21
3) Products_Product_ViewSuccessViewTest::testHandlesOutputType with data
set "html" ('text')
RuntimeException: Fatal error: Class
'AgaviBaseConstraintBecausePhpunitSucksAtBackwardsCompatibility' not
found in
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php
on line 18
Call Stack:
0.0008 705624 1. {main}() -:0
0.0298 4096320 2. __phpunit_run_isolated_test() -:241
0.0454 6170456 3. PHPUnit_Framework_TestCase->run() -:36
0.0473 6328192 4. PHPUnit_Framework_TestResult->run()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:751
0.0492 6415080 5. PHPUnit_Framework_TestCase->runBare()
/opt/local/lib/php/PHPUnit/Framework/TestResult.php:649
0.0951 11402656 6. PHPUnit_Framework_TestCase->runTest()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:804
0.0951 11404232 7. ReflectionMethod->invokeArgs()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0951 11404264 8.
Products_Product_ViewSuccessViewTest->testHandlesOutputType()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0951 11404264 9. AgaviViewTestCase->assertHandlesOutputType()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewSuccessViewTest.php:20
0.0980 11518672 10. Agavi::__autoload()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewSuccessViewTest.php:0
0.0982 11540064 11.
require('/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php')
/Users/shoan/Sites/sandbox/agavi/1.0b/src/core/Agavi.class.php:69
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/AgaviTesting.class.php:146
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/run-tests.php:21
4) Products_Product_ViewSuccessViewTest::testHandlesOutputType with data
set "soap" ('soap')
RuntimeException: Fatal error: Class
'AgaviBaseConstraintBecausePhpunitSucksAtBackwardsCompatibility' not
found in
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php
on line 18
Call Stack:
0.0008 705624 1. {main}() -:0
0.0292 4096320 2. __phpunit_run_isolated_test() -:241
0.0420 6170456 3. PHPUnit_Framework_TestCase->run() -:36
0.0436 6328192 4. PHPUnit_Framework_TestResult->run()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:751
0.0450 6415080 5. PHPUnit_Framework_TestCase->runBare()
/opt/local/lib/php/PHPUnit/Framework/TestResult.php:649
0.1014 11402656 6. PHPUnit_Framework_TestCase->runTest()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:804
0.1014 11404232 7. ReflectionMethod->invokeArgs()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.1014 11404264 8.
Products_Product_ViewSuccessViewTest->testHandlesOutputType()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.1014 11404264 9. AgaviViewTestCase->assertHandlesOutputType()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewSuccessViewTest.php:20
0.1040 11518672 10. Agavi::__autoload()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewSuccessViewTest.php:0
0.1045 11540064 11.
require('/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php')
/Users/shoan/Sites/sandbox/agavi/1.0b/src/core/Agavi.class.php:69
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/AgaviTesting.class.php:146
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/run-tests.php:21
5) Products_Product_ViewSuccessViewTest::testHandlesOutputType with data
set "xmlrpc" ('xmlrpc')
RuntimeException: Fatal error: Class
'AgaviBaseConstraintBecausePhpunitSucksAtBackwardsCompatibility' not
found in
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php
on line 18
Call Stack:
0.0009 705624 1. {main}() -:0
0.0277 4096320 2. __phpunit_run_isolated_test() -:241
0.0404 6170456 3. PHPUnit_Framework_TestCase->run() -:36
0.0423 6328192 4. PHPUnit_Framework_TestResult->run()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:751
0.0437 6415080 5. PHPUnit_Framework_TestCase->runBare()
/opt/local/lib/php/PHPUnit/Framework/TestResult.php:649
0.0895 11402656 6. PHPUnit_Framework_TestCase->runTest()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:804
0.0896 11404232 7. ReflectionMethod->invokeArgs()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0896 11404264 8.
Products_Product_ViewSuccessViewTest->testHandlesOutputType()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0896 11404264 9. AgaviViewTestCase->assertHandlesOutputType()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewSuccessViewTest.php:20
0.0921 11518672 10. Agavi::__autoload()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewSuccessViewTest.php:0
0.0924 11540064 11.
require('/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php')
/Users/shoan/Sites/sandbox/agavi/1.0b/src/core/Agavi.class.php:69
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/AgaviTesting.class.php:146
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/run-tests.php:21
6) Products_Product_ViewSuccessViewTest::testNotHandlesXmlOutputType
RuntimeException: Fatal error: Class
'AgaviBaseConstraintBecausePhpunitSucksAtBackwardsCompatibility' not
found in
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php
on line 18
Call Stack:
0.0008 705648 1. {main}() -:0
0.0274 4096448 2. __phpunit_run_isolated_test() -:241
0.0402 6170448 3. PHPUnit_Framework_TestCase->run() -:36
0.0417 6327704 4. PHPUnit_Framework_TestResult->run()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:751
0.0431 6414560 5. PHPUnit_Framework_TestCase->runBare()
/opt/local/lib/php/PHPUnit/Framework/TestResult.php:649
0.0887 11402120 6. PHPUnit_Framework_TestCase->runTest()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:804
0.0887 11403616 7. ReflectionMethod->invokeArgs()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0887 11403648 8.
Products_Product_ViewSuccessViewTest->testNotHandlesXmlOutputType()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0887 11403728 9.
AgaviViewTestCase->assertNotHandlesOutputType()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewSuccessViewTest.php:36
0.0913 11518120 10. Agavi::__autoload()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/Products/Product/ViewSuccessViewTest.php:0
0.0915 11539512 11.
require('/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php')
/Users/shoan/Sites/sandbox/agavi/1.0b/src/core/Agavi.class.php:69
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/AgaviTesting.class.php:146
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/run-tests.php:21
7) LoginSuccessViewTest::testHandlesOutputType
RuntimeException: Fatal error: Class
'AgaviBaseConstraintBecausePhpunitSucksAtBackwardsCompatibility' not
found in
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php
on line 18
Call Stack:
0.0008 705568 1. {main}() -:0
0.0275 4096224 2. __phpunit_run_isolated_test() -:241
0.0402 6182656 3. PHPUnit_Framework_TestCase->run() -:36
0.0417 6339856 4. PHPUnit_Framework_TestResult->run()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:751
0.0431 6426776 5. PHPUnit_Framework_TestCase->runBare()
/opt/local/lib/php/PHPUnit/Framework/TestResult.php:649
0.0886 11414168 6. PHPUnit_Framework_TestCase->runTest()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:804
0.0887 11415624 7. ReflectionMethod->invokeArgs()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0887 11415656 8. LoginSuccessViewTest->testHandlesOutputType()
/opt/local/lib/php/PHPUnit/Framework/TestCase.php:942
0.0887 11415736 9. AgaviViewTestCase->assertHandlesOutputType()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/LoginSuccessViewTest.php:16
0.0913 11526480 10. Agavi::__autoload()
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/fragment/LoginSuccessViewTest.php:0
0.0916 11547872 11.
require('/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/PHPUnit/Constraint/AgaviConstraintViewHandlesOutputType.php')
/Users/shoan/Sites/sandbox/agavi/1.0b/src/core/Agavi.class.php:69
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/AgaviTesting.class.php:146
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/run-tests.php:21
--
There was 1 failure:
1) LoginFlowTest::testValidWriteRequest
Failed asserting that false is true.
/Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/AgaviFlowTestCase.class.php:120
/Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/flow/LoginFlowTest.php:17
FAILURES!
Tests: 51, Assertions: 115, Failures: 1, Errors: 7.
_______________________________________________
users mailing list
us...@lists.agavi.org
http://lists.agavi.org/mailman/listinfo/users
> Hi All,
>
> I am evaluating the feasibility of using unit testing for an upcoming
> project. When I tried running the tests against the sample app, I got
> the following errors. I don't have a trac account, so wasn't able to
> file a ticket there.
Trac is in read-only mode for the migration to GitHub.
> P.S.: +1 for
> AgaviBaseConstraintBecausePhpunitSucksAtBackwardsCompatibility naming. :)
>
> Peace,
> Shoan.
>
>
>> [shoan@nirvana:~/Sites/sandbox/agavi/1.0b/samples/test]$ php
>> run-tests.php PHPUnit 3.6.10 by Sebastian Bergmann.
>>
>> ......................................EEEEEE.E...F.
>>
>> Time: 9 seconds, Memory: 14.75Mb
>>
>> There were 7 errors:
>>
>>
>> --
>>
>>
>> There was 1 failure:
>>
>> 1) LoginFlowTest::testValidWriteRequest
>> Failed asserting that false is true.
>>
>> /Users/shoan/Sites/sandbox/agavi/1.0b/src/testing/AgaviFlowTestCase.class.php:120
>> /Users/shoan/Sites/sandbox/agavi/1.0b/samples/test/tests/flow/LoginFlowTest.php:17
>>
>> FAILURES!
>> Tests: 51, Assertions: 115, Failures: 1, Errors: 7.
Not sure what you're doing there, works fine for me:
> localhost:test dzuelke$ php run-tests.php
> PHPUnit 3.6.10 by Sebastian Bergmann.
>
> ...................................................
>
> Time: 6 seconds, Memory: 11.00Mb
>
> OK (51 tests, 122 assertions)
This is on the latest 1.0 from SVN. Same result for 1.0.7. Update your install and maybe also clear any caches manually.
David
On 20/02/12 11:18 AM, David Zülke wrote:
>
> Not sure what you're doing there, works fine for me:
>
>> localhost:test dzuelke$ php run-tests.php
>> PHPUnit 3.6.10 by Sebastian Bergmann.
>>
>> ...................................................
>>
>> Time: 6 seconds, Memory: 11.00Mb
>>
>> OK (51 tests, 122 assertions)
>
> This is on the latest 1.0 from SVN. Same result for 1.0.7. Update your install and maybe also clear any caches manually.
>
> David
>
Ok. Clearing the cache manually did it. Thanks.
Peace,
Shoan.