Commit ab3b1030 authored by Ben Hayward's avatar Ben Hayward

Wrong commit

1 merge request!337[Sprint/NuancedNumbat](feat): Enable feature flags when staging cookie set. #857
Pipeline #85094958 passed with stages
in 9 minutes and 38 seconds
......@@ -9,6 +9,7 @@
namespace Minds\Core\Features;
use Minds\Core\Di\Di;
use Minds\Common\Cookie;
use Minds\Core\Session;
class Manager
......@@ -18,8 +19,11 @@ class Manager
/** @var Config $config */
private $config;
/** @var Cookie $cookie */
private $cookie;
public function __construct($config = null)
public function __construct($config = null, $cookie = null)
{
$this->config = $config ?: Di::_()->get('Config');
$this->cookie = $cookie ?: new Cookie;
......
......@@ -7,7 +7,6 @@ use Minds\Core\Di\Di;
use Minds\Core\Features\Manager;
use Minds\Entities\User;
use PhpSpec\ObjectBehavior;
use Minds\Common\Cookie;
class ManagerSpec extends ObjectBehavior
{
......@@ -17,11 +16,10 @@ class ManagerSpec extends ObjectBehavior
/** @var Cookie */
protected $cookie;
public function let(Config $config, Cookie $cookie)
public function let(Config $config)
{
$this->beConstructedWith($config);
$this->config = $config;
$this->cookie = $cookie;
}
public function it_is_initializable()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment