Move the Handler tests to PSR-0. This is for 8.x-3.x.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aspilicious’s picture

Looks good someone needs to verify these tests are selectable and come back green

aspilicious’s picture

Title: Convert Handler tests to PSR-0 » [8.x] Convert Handler tests to PSR-0
Issue tags: +VDC
Manuel Garcia’s picture

Status: Needs review » Needs work

Patch applies cleanly

manuel@manuel-laptop:~/htdocs/drupal8/sites/all/modules/views$ git apply -v handlers_0.patch
Checking patch tests/handlers/views_handler_area_text.test => lib/Drupal/views/Tests/Handler/AreaTextTest.php...
Checking patch tests/handlers/views_handler_argument_null.test => lib/Drupal/views/Tests/Handler/ArgumentNullTest.php...
Checking patch tests/handlers/views_handler_argument_string.test => lib/Drupal/views/Tests/Handler/ArgumentStringTest.php...
Checking patch tests/handlers/views_handler_field_boolean.test => lib/Drupal/views/Tests/Handler/FieldBooleanTest.php...
Checking patch tests/handlers/views_handler_field_counter.test => lib/Drupal/views/Tests/Handler/FieldCounterTest.php...
Checking patch tests/handlers/views_handler_field_custom.test => lib/Drupal/views/Tests/Handler/FieldCustomTest.php...
Checking patch tests/handlers/views_handler_field_date.test => lib/Drupal/views/Tests/Handler/FieldDateTest.php...
Checking patch tests/handlers/views_handler_field_file_size.test => lib/Drupal/views/Tests/Handler/FieldFileSizeTest.php...
Checking patch tests/handlers/views_handler_field_math.test => lib/Drupal/views/Tests/Handler/FieldMathTest.php...
Checking patch tests/handlers/views_handler_field.test => lib/Drupal/views/Tests/Handler/FieldTest.php...
Checking patch tests/handlers/views_handler_field_url.test => lib/Drupal/views/Tests/Handler/FieldUrlTest.php...
Checking patch tests/handlers/views_handler_field_xss.test => lib/Drupal/views/Tests/Handler/FieldXssTest.php...
Checking patch tests/handlers/views_handler_filter_combine.test => lib/Drupal/views/Tests/Handler/FilterCombineTest.php...
Checking patch tests/handlers/views_handler_filter_date.test => lib/Drupal/views/Tests/Handler/FilterDateTest.php...
Checking patch tests/handlers/views_handler_filter_equality.test => lib/Drupal/views/Tests/Handler/FilterEqualityTest.php...
Checking patch tests/handlers/views_handler_filter_in_operator.test => lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php...
Checking patch tests/handlers/views_handler_filter_numeric.test => lib/Drupal/views/Tests/Handler/FilterNumericTest.php...
Checking patch tests/handlers/views_handler_filter_string.test => lib/Drupal/views/Tests/Handler/FilterStringTest.php...
Checking patch tests/handlers/views_handler_sort_date.test => lib/Drupal/views/Tests/Handler/SortDateTest.php...
Checking patch tests/handlers/views_handler_sort_random.test => lib/Drupal/views/Tests/Handler/SortRandomTest.php...
Checking patch tests/handlers/views_handler_sort.test => lib/Drupal/views/Tests/Handler/SortTest.php...
Applied patch tests/handlers/views_handler_area_text.test => lib/Drupal/views/Tests/Handler/AreaTextTest.php cleanly.
Applied patch tests/handlers/views_handler_argument_null.test => lib/Drupal/views/Tests/Handler/ArgumentNullTest.php cleanly.
Applied patch tests/handlers/views_handler_argument_string.test => lib/Drupal/views/Tests/Handler/ArgumentStringTest.php cleanly.
Applied patch tests/handlers/views_handler_field_boolean.test => lib/Drupal/views/Tests/Handler/FieldBooleanTest.php cleanly.
Applied patch tests/handlers/views_handler_field_counter.test => lib/Drupal/views/Tests/Handler/FieldCounterTest.php cleanly.
Applied patch tests/handlers/views_handler_field_custom.test => lib/Drupal/views/Tests/Handler/FieldCustomTest.php cleanly.
Applied patch tests/handlers/views_handler_field_date.test => lib/Drupal/views/Tests/Handler/FieldDateTest.php cleanly.
Applied patch tests/handlers/views_handler_field_file_size.test => lib/Drupal/views/Tests/Handler/FieldFileSizeTest.php cleanly.
Applied patch tests/handlers/views_handler_field_math.test => lib/Drupal/views/Tests/Handler/FieldMathTest.php cleanly.
Applied patch tests/handlers/views_handler_field.test => lib/Drupal/views/Tests/Handler/FieldTest.php cleanly.
Applied patch tests/handlers/views_handler_field_url.test => lib/Drupal/views/Tests/Handler/FieldUrlTest.php cleanly.
Applied patch tests/handlers/views_handler_field_xss.test => lib/Drupal/views/Tests/Handler/FieldXssTest.php cleanly.
Applied patch tests/handlers/views_handler_filter_combine.test => lib/Drupal/views/Tests/Handler/FilterCombineTest.php cleanly.
Applied patch tests/handlers/views_handler_filter_date.test => lib/Drupal/views/Tests/Handler/FilterDateTest.php cleanly.
Applied patch tests/handlers/views_handler_filter_equality.test => lib/Drupal/views/Tests/Handler/FilterEqualityTest.php cleanly.
Applied patch tests/handlers/views_handler_filter_in_operator.test => lib/Drupal/views/Tests/Handler/FilterInOperatorTest.php cleanly.
Applied patch tests/handlers/views_handler_filter_numeric.test => lib/Drupal/views/Tests/Handler/FilterNumericTest.php cleanly.
Applied patch tests/handlers/views_handler_filter_string.test => lib/Drupal/views/Tests/Handler/FilterStringTest.php cleanly.
Applied patch tests/handlers/views_handler_sort_date.test => lib/Drupal/views/Tests/Handler/SortDateTest.php cleanly.
Applied patch tests/handlers/views_handler_sort_random.test => lib/Drupal/views/Tests/Handler/SortRandomTest.php cleanly.
Applied patch tests/handlers/views_handler_sort.test => lib/Drupal/views/Tests/Handler/SortTest.php cleanly.

However, after clearing the cache, visiting the tests page gets you a WSOD. Here's the apache error.log

[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP Fatal error:  require_once(): Failed opening required '/home/manuel/htdocs/drupal8/sites/all/modules/views/tests/handlers/views_handler_area_text.test' (include_path='.:/usr/share/php:/usr/share/pear') in /home/manuel/htdocs/drupal8/core/includes/bootstrap.inc on line 3081
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP Stack trace:
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP   1. {main}() /home/manuel/htdocs/drupal8/index.php:0
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP   2. Symfony\\Component\\HttpKernel\\HttpKernel->handle() /home/manuel/htdocs/drupal8/index.php:46
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP   3. Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw() /home/manuel/htdocs/drupal8/core/vendor/Symfony/Component/HttpKernel/HttpKernel.php:72
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP   4. call_user_func_array() /home/manuel/htdocs/drupal8/core/vendor/Symfony/Component/HttpKernel/HttpKernel.php:128
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP   5. Drupal\\Core\\EventSubscriber\\{closure}() /home/manuel/htdocs/drupal8/core/vendor/Symfony/Component/HttpKernel/HttpKernel.php:0
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP   6. call_user_func_array() /home/manuel/htdocs/drupal8/core/lib/Drupal/Core/EventSubscriber/LegacyControllerSubscriber.php:45
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP   7. drupal_get_form() /home/manuel/htdocs/drupal8/core/lib/Drupal/Core/EventSubscriber/LegacyControllerSubscriber.php:0
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP   8. drupal_build_form() /home/manuel/htdocs/drupal8/core/includes/form.inc:132
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP   9. drupal_retrieve_form() /home/manuel/htdocs/drupal8/core/includes/form.inc:339
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP  10. call_user_func_array() /home/manuel/htdocs/drupal8/core/includes/form.inc:804
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP  11. simpletest_test_form() /home/manuel/htdocs/drupal8/core/includes/form.inc:0
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP  12. simpletest_test_get_all() /home/manuel/htdocs/drupal8/core/modules/simpletest/simpletest.pages.inc:23
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP  13. class_exists() /home/manuel/htdocs/drupal8/core/modules/simpletest/simpletest.module:362
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP  14. drupal_autoload_class() /home/manuel/htdocs/drupal8/core/includes/bootstrap.inc:0
[Fri Jun 15 16:43:07 2012] [error] [client 127.0.0.1] PHP  15. _registry_check_code() /home/manuel/htdocs/drupal8/core/includes/bootstrap.inc:3005
aspilicious’s picture

Yeah the info file needs a cleanup ;)

dawehner’s picture

Version: 7.x-3.x-dev » 8.x-3.x-dev

Now the testbot should come in

dawehner’s picture

Status: Needs work » Needs review

handlers.patch queued for re-testing.

Manuel Garcia’s picture

Status: Needs review » Needs work
FileSize
85.94 KB

Here's the updated patch with the info file cleanup.

I then ran all views handlers tests:
Area: text: 5 passes, 0 fails, 0 exceptions, and 1 debug message OK
Argument: Null: 5 passes, 0 fails, 0 exceptions, and 2 debug messages OK
Argument: String: 1 pass, 18 fails, and 1 exception BROKEN:
Class 'Drupal\views\Tests\Handler\view' not found PHP Fatal error file:ArgumentStringTest.php Line 63 Function: Unknow

aspilicious’s picture

You're misisng the new files

Manuel Garcia’s picture

Status: Needs work » Needs review
FileSize
19.26 KB

OK, after input from aspilicious in IRC, we had to put use view; in the failing tests.

I reran all tests, and fixed those that exploded.

dawehner’s picture

Status: Needs review » Fixed

yeeaaah the first patch is in!

RobLoach’s picture

Issue tags: +PSR-0
tim.plunkett’s picture

Title: [8.x] Convert Handler tests to PSR-0 » Convert Handler tests to PSR-0

Automatically closed -- issue fixed for 2 weeks with no activity.