Add unit tests for JInstallerAdapter#7569
Conversation
There was a problem hiding this comment.
$this->assertAttributeInstanceOf('JTableExtension', 'extension', $object);
Don't need to use our Reflection helpers here. Use the PHPUnit API as it's practical.
There was a problem hiding this comment.
Fixed and a couple of other instances based on this
There was a problem hiding this comment.
If you've mocked everything and you aren't running any real database queries (still looking this over), then you can just extend TestCase instead. Saves a few processing cycles on the test setup if it doesn't have to deal with the database configuration.
There was a problem hiding this comment.
OK So my dataset still isn't being loaded :(
There was a problem hiding this comment.
Stop overriding JFactory::$database in your setup method. TestCaseDatabase is setting the test connection in its setup routine.
There was a problem hiding this comment.
Ahh fair. Does this mean I don't need to inject the extensions data set as well?
There was a problem hiding this comment.
Long and short, just make sure all the changes from wilsonge@6ab866e are reverted and we can go from there.
|
Can you put |
|
Done everything I think |
|
Well, the question was answered on the database thing. Guess it needs to extend TestCaseDatabase. |
|
I'm going to try mocking the |
|
@mbabker where we at with this? |
This gives us code coverage of ~75% of the lines in the class (15/23 methods in the class)