Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflect::on - Add invoke method functionality #4

Open
nickl- opened this issue Feb 24, 2013 · 0 comments
Open

Reflect::on - Add invoke method functionality #4

nickl- opened this issue Feb 24, 2013 · 0 comments

Comments

@nickl-
Copy link
Member

nickl- commented Feb 24, 2013

Here's an easy one to get your fingers wet while you explore what's under the hood.

Task

Enable invoke method functionality for Respect/Test/Reflect::on. Completion would allow us to execute any private, public, protected, static or instance method against either a supplied class or object.

Reflect::on('Respect\\Test\\TestGuy')->invoke('privateMethod', [&$byref, $value, 47, 'this-rocks']);

Heads-up

ReflectObject already has the invoke($name, array $args array()) method and getInstance has an implementation for executing the constructor as example. invoke needs to become public, added to the Reflectable interface and exposed through Respect\Test\Reflect.

Expand the TestGuy class in the ReflectTest unit test to include public, protected and private methods, both instance and static. Also add pass by reference parameters to test things thoroughly.

Test invoke functionality in both ReflectTest and ReflectObjectTest (see get/setProperty for examples) to ensure we get closer to 100% code coverage.

Suggestions

Have fun and don't hesitate to ask for help.

Claim your Easy Pick now

To let everyone else know that you have claimed the task, simply comment to this post before you start. Fork the project and submit a pull request with your changes for revue.

Be awesome as you are and make for Happy Pandas! =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant