Closed (fixed)
Project:
Examples for Developers
Version:
8.x-1.x-dev
Component:
PHPUnit Example
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
1 Jul 2013 at 23:50 UTC
Updated:
4 Jan 2014 at 03:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mile23Added PHPUnit Example to the list of categories.
Comment #2
mile23The beginning of phpunit_example.
It will likely pass because the testbot won't run it's PHPUnit tests, and it doesn't have any SimpleTest tests.
To get PHPUnit to run the tests in this module, you'll need to apply the patches in the linked issues above.
Still to do:
Comment #2.0
mile23Added another @see issue link.
Comment #3
mile23Added reflection and stubbing demo.
Still needs: Mocking demo, doc cleanup (@ingroup, etc)
Comment #5
wim leersNice work! :)
Comment #6
mile23Nice work except for the no tests part.
Comment #7
mile23Clearly my spare time has run dry, so I'll commit this as-is.
Further features can have their own issues.
http://drupalcode.org/project/examples.git/commit/cadcdc9e8e20e6ff20f198...
Comment #8
marvil07 commentedIt seems like this additions has broken tests.
I'm not sure now about the real problem now.
I would like to revert this in order to test other to testbot to test other patches in the issue. Is that ok?
We can always re-include it ;-) (also it seems to be needing some changes, i.e. page_example strings).
Comment #9
mile23Aha.
I should have left this as postponed.... The problem is that the PHPUnit configuration is smart enough to load the test, but the autoloader is not smart enough to load the test class. #2025883: Drupal's PHPUnit bootstrap.php does not register module namespaces out of /core
Yah, I'll yank it. Sob. http://drupalcode.org/project/examples.git/commit/784ccc2be317b27ca4eb8f...
Comment #10
mile23I made a github repo here, since I'll be presenting this in two weeks: https://github.com/paul-m/phpunit_example
Comment #11
marvil07 commented#3: 2032697-phpunit_example-3.patch queued for re-testing.
Comment #12
marvil07 commented@testbot: Re-test last patch now that dependent patch in core has landed.
Comment #14
mile23A few doc tweaks...
Comment #15
mile23Comment #17
xano#14: 2032697_phpunit_example_14.patch queued for re-testing.
Comment #19
eliza411 commentedFYI, I created a handbook page explaining where to put tests, and how the directory structure relates to namespace and class name: https://drupal.org/node/2116043 (I've had to explain this to a lot of developers who've never heard of PSR-0 in the context of Behat and the Drupal Extension)
There's definitely more to do and I'm not sure about the relationship between handbook pages and the Examples module, so I'm open to feedback for sure.
Comment #20
mile23Diggit. :-)
I think the more places the better, especially in this context.
There's also big caveats because of #1971198: [policy] Drupal and PSR-0/PSR-4 Class Loading.
Comment #21
mile23#14: 2032697_phpunit_example_14.patch queued for re-testing.
Comment #21.0
mile23Added reference to coding standards discussion.
Comment #22
mile23Updated some documentation.
Comment #24
mile2322: 2032697_phpunit_example_22.patch queued for re-testing.
Comment #26
mile23Try, try again.
I had failing tests locally because I needed to delete /sites/default/files/php. Let's see if the testbot is similarly hobbled.
Comment #28
mile2326: 2032697_26_phpunit_example.patch queued for re-testing.
Comment #30
mile2326: 2032697_26_phpunit_example.patch queued for re-testing.
Comment #31
mile23Finally. :-)
Committed: http://drupalcode.org/project/examples.git/commit/17160ed3140b3ed8226134...