Exemplo n.º 1
0
 public function setUp()
 {
     parent::setUp();
     SessionFactory::init(new MockArraySessionStorage());
     $char_id = TestAccountCreateAndDestroy::create_testing_account();
     SessionFactory::getSession()->set('player_id', $char_id);
 }
Exemplo n.º 2
0
 public function setUp()
 {
     parent::setUp();
     $this->account_id = TestAccountCreateAndDestroy::account_id();
     $this->account = Account::findById($this->account_id);
     $this->nonce = Crypto::nonce();
 }
Exemplo n.º 3
0
 public function setUp()
 {
     parent::setUp();
     // Mock the post request.
     $request = new Request([], []);
     RequestWrapper::inject($request);
     $this->login();
 }
Exemplo n.º 4
0
 function setUp()
 {
     parent::setUp();
     // Mock the post request.
     $request = new Request([], ['worked' => 10]);
     RequestWrapper::inject($request);
     SessionFactory::init(new MockArraySessionStorage());
 }
Exemplo n.º 5
0
 public function setUp()
 {
     parent::setUp();
     SessionFactory::init(new MockArraySessionStorage());
     $char_id = TestAccountCreateAndDestroy::create_testing_account();
     SessionFactory::getSession()->set('player_id', $char_id);
     $this->clan = Clan::create(Player::find($char_id), 'phpunit_test_clan');
 }
Exemplo n.º 6
0
 public function setUp()
 {
     parent::setUp();
     SessionFactory::init(new MockArraySessionStorage());
     $char_id = TestAccountCreateAndDestroy::create_testing_account();
     SessionFactory::getSession()->set('player_id', $char_id);
     $request = new Request([], []);
     RequestWrapper::inject($request);
 }
Exemplo n.º 7
0
 function setUp()
 {
     parent::setUp();
     $this->char = TestAccountCreateAndDestroy::char();
     $request = new Request([], []);
     RequestWrapper::inject($request);
     SessionFactory::init(new MockArraySessionStorage());
     $sess = SessionFactory::getSession();
     $sess->set('player_id', $this->char->id());
 }
Exemplo n.º 8
0
 /**
  */
 public function setUp()
 {
     parent::setUp();
     // Mock the post request.
     $request = new Request([], []);
     RequestWrapper::inject($request);
     $this->char_id = TestAccountCreateAndDestroy::create_testing_account();
     $session = SessionFactory::init(new MockArraySessionStorage());
     $session->set('player_id', $this->char_id);
     $session->set('account_id', $this->char_id);
 }
 public function setUp()
 {
     parent::setUp();
     $this->controller = new InventoryController();
     $this->char = TestAccountCreateAndDestroy::char();
     $this->inventory = new Inventory($this->char);
     $request = new Request([], []);
     RequestWrapper::inject($request);
     SessionFactory::init(new MockArraySessionStorage());
     $sess = SessionFactory::getSession();
     $sess->set('player_id', $this->char->id());
     $this->inventory->add(self::ITEM);
 }
Exemplo n.º 10
0
 public function setUp()
 {
     parent::setUp();
     $this->controller = new MapController();
 }