/** * Tests the basic methods of Entity class */ public function testPlayer() { $player = new Player(); $player->setId(1); $player->setName('Switchback'); $this->assertEquals($player->getId(), 1); $this->assertEquals($player->getName(), 'Switchback'); // TODO: test deck // TODO: test hero }
/** * Setup stuff */ protected function setUp() { // Seed random so we can predict the outcome of random events srand(self::RANDOM_SEED); // Create players $me = new Player(); $me->setId(1); $me->setName('Switchback'); $me->setHero(new GarroshHellscream()); // Warrior hero $opponent = new Player(); $opponent->setId(2); $opponent->setName('SMOrcThaBork'); $opponent->setHero(new GarroshHellscream()); // Warrior hero // Create board $this->board = new Board($me, $opponent); }