Skip to content

Commit

Permalink
Fix missing DIContainerTrait when StaticAddToTrait is used
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jun 7, 2020
1 parent 71e7b4f commit f344249
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions demos/_unit-test/console_run.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@

require_once __DIR__ . '/../atk-init.php';

$testRun = get_class(new class() extends \atk4\data\Model {
$testRun = new class() extends \atk4\data\Model {
use \atk4\core\DebugTrait;
use \atk4\core\StaticAddToTrait;

public function test()
{
Expand All @@ -24,10 +23,10 @@ public function test()

return 123;
}
});
};

$sse = jsSSE::addTo($app);
$sse->urlTrigger = 'console_test';

$console = \atk4\ui\Console::addTo($app, ['sse' => $sse]);
$console->runMethod($testRun::addTo($app), 'test');
$console->runMethod($app->add($testRun), 'test');

0 comments on commit f344249

Please sign in to comment.