Onion icon indicating copy to clipboard operation
Onion copied to clipboard

Errors on tests

Open nelsonsar opened this issue 13 years ago • 3 comments

When you run Onion test you get, for example: Undefined property: tests\Onion\Dependency\DependencyResolverTest::$logger

Because some tests use $logger as a static variable but it is not. So we have two approaches:

  1. Use mocked instances of logger;
  2. Creating an instance of logger to each test;

nelsonsar avatar Sep 15 '12 13:09 nelsonsar

For that, we can get the logger from Onion\Application::getInstance()->getLogger() for now. ;-)

c9s avatar Sep 15 '12 15:09 c9s

Do you have any flow to pull requests? Because I really wanna contribute with you :-)

nelsonsar avatar Sep 15 '12 16:09 nelsonsar

Nop, you simply run unit tests, if tests passes, the pull request should be fine. ;-)

c9s avatar Sep 15 '12 16:09 c9s