Guest User

Untitled

a guest
Jun 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. Index: unit/ModelInterceptorTest.php
  2. ===================================================================
  3. --- unit/ModelInterceptorTest.php (revision 11512)
  4. +++ unit/ModelInterceptorTest.php (working copy)
  5. @@ -3,16 +3,16 @@
  6.  
  7. function testNotIntercepted() {
  8. api_model_factory::registerInterceptor(new test_interceptor());
  9. - $model = api_model_factory::get('array');
  10. - $this->assertEquals(get_class($model), 'api_model_array');
  11. + $model = api_model_factory::get('array',array(array()));
  12. + $this->assertEqual(get_class($model), 'api_model_array');
  13. }
  14.  
  15. function testIntercepted() {
  16. $interceptor = new test_interceptor();
  17. $interceptor->intercepts = true;
  18. api_model_factory::registerInterceptor($interceptor);
  19. - $model = api_model_factory::get('array');
  20. - $this->assertEquals(get_class($model), 'test_model');
  21. + $model = api_model_factory::get('array',array(array()));
  22. + $this->assertEqual(get_class($model), 'test_model');
  23. }
  24. }
Add Comment
Please, Sign In to add comment