php Programming Glossary: mytestsubject
How is testing Registry Pattern or Singleton hard in PHP? http://stackoverflow.com/questions/5283102/how-is-testing-registry-pattern-or-singleton-hard-in-php spend time recreating a working environment. Example class MyTestSubject protected registry public function __construct this registry.. test it has to be reset for each test you will run on MyTestSubject. You could add a Registry reset method and call that in setup.. public function setup Registry reset this testSubject new MyTestSubject Now you still don't have the 'MyActiveRecord' object it is supposed..
|