12
12
13
13
use Joomla \CMS \MVC \Factory \MVCFactoryInterface ;
14
14
use Joomla \Component \Actionlogs \Administrator \Model \ActionlogConfigModel ;
15
- use Joomla \Database \DatabaseDriver ;
15
+ use Joomla \Database \DatabaseInterface ;
16
16
use Joomla \Tests \Unit \UnitTestCase ;
17
17
18
18
/**
@@ -33,10 +33,9 @@ class ActionlogConfigModelTest extends UnitTestCase
33
33
*/
34
34
public function testGetLogContentTypeParams ()
35
35
{
36
- /* @todo: Return to DatabaseInterface when createQuery is implemented in the interface */
37
36
$ config = new \stdClass ();
38
- $ db = $ this ->createStub (DatabaseDriver ::class);
39
- $ db ->method ('createQuery ' )->willReturn ($ this ->getQueryStub ($ db ));
37
+ $ db = $ this ->createStub (DatabaseInterface ::class);
38
+ $ db ->method ('getQuery ' )->willReturn ($ this ->getQueryStub ($ db ));
40
39
$ db ->method ('loadObject ' )->willReturn ($ config );
41
40
42
41
$ model = new ActionlogConfigModel (['dbo ' => $ db ], $ this ->createStub (MVCFactoryInterface::class));
@@ -53,9 +52,8 @@ public function testGetLogContentTypeParams()
53
52
*/
54
53
public function testGetNullLogContentTypeParams ()
55
54
{
56
- /* @todo: Return to DatabaseInterface when createQuery is implemented in the interface */
57
- $ db = $ this ->createStub (DatabaseDriver::class);
58
- $ db ->method ('createQuery ' )->willReturn ($ this ->getQueryStub ($ db ));
55
+ $ db = $ this ->createStub (DatabaseInterface::class);
56
+ $ db ->method ('getQuery ' )->willReturn ($ this ->getQueryStub ($ db ));
59
57
60
58
$ model = new ActionlogConfigModel (['dbo ' => $ db ], $ this ->createStub (MVCFactoryInterface::class));
61
59
0 commit comments