mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-11 01:24:27 +02:00
Using method-chaining for DICE
This commit is contained in:
parent
a66580444f
commit
9682cc440c
9 changed files with 27 additions and 25 deletions
|
@ -57,9 +57,9 @@ class ApiTest extends DatabaseTest
|
|||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->dice = new Dice();
|
||||
$this->dice = $this->dice->addRules(include __DIR__ . '/../../static/dependencies.config.php');
|
||||
$this->dice = $this->dice->addRule(Database::class, ['instanceOf' => StaticDatabase::class, 'shared' => true]);
|
||||
$this->dice = (new Dice())
|
||||
->addRules(include __DIR__ . '/../../static/dependencies.config.php')
|
||||
->addRule(Database::class, ['instanceOf' => StaticDatabase::class, 'shared' => true]);
|
||||
BaseObject::setDependencyInjection($this->dice);
|
||||
|
||||
/** @var Database $dba */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue