|
13 | 13 | use Exception; |
14 | 14 | use Joomla\CMS\MVC\Factory\MVCFactoryInterface; |
15 | 15 | use Joomla\CMS\MVC\Model\BaseDatabaseModel; |
16 | | -use Joomla\CMS\MVC\Model\DatabaseAwareTrait; |
17 | 16 | use Joomla\CMS\Table\Table; |
18 | 17 | use Joomla\CMS\User\User; |
19 | 18 | use Joomla\Database\DatabaseInterface; |
@@ -303,49 +302,4 @@ public function testCheckedOutWitFieldEmptyUserSet() |
303 | 302 |
|
304 | 303 | $this->assertTrue($model->isCheckedOut((object)['checked_out' => 1])); |
305 | 304 | } |
306 | | - |
307 | | - /** |
308 | | - * @testdox still can use the old trait |
309 | | - * |
310 | | - * @return void |
311 | | - * |
312 | | - * @since 4.2.0 |
313 | | - * |
314 | | - * @deprecated 5.0 Must be removed when trait gets deleted |
315 | | - */ |
316 | | - public function testUseOldMVCTrait() |
317 | | - { |
318 | | - $db = $this->createStub(DatabaseInterface::class); |
319 | | - |
320 | | - $model = new class (['dbo' => $db], $this->createStub(MVCFactoryInterface::class)) extends BaseDatabaseModel { |
321 | | - use DatabaseAwareTrait; |
322 | | - }; |
323 | | - |
324 | | - $this->assertEquals($db, $model->getDbo()); |
325 | | - } |
326 | | - |
327 | | - /** |
328 | | - * @testdox operates normally even when no variable is declared |
329 | | - * |
330 | | - * @return void |
331 | | - * |
332 | | - * @since 4.2.0 |
333 | | - * |
334 | | - * @deprecated 5.0 This has to be removed when we do not support the MVC Trait anymore |
335 | | - */ |
336 | | - public function testNotDeclaredVariable() |
337 | | - { |
338 | | - $model = new class (['dbo' => $this->createStub(DatabaseInterface::class)], $this->createStub(MVCFactoryInterface::class)) extends BaseDatabaseModel { |
339 | | - public function cache($key, $value) |
340 | | - { |
341 | | - if (!isset($this->test[$key])) { |
342 | | - $this->test[$key] = $value; |
343 | | - } |
344 | | - |
345 | | - return $this->test[$key]; |
346 | | - } |
347 | | - }; |
348 | | - |
349 | | - $this->assertEquals('test', $model->cache(1, 'test')); |
350 | | - } |
351 | 305 | } |
0 commit comments