public function test_accessors() { /** === Test Data === */ $NAME = 'name'; $LEVEL = 'level'; /** === Setup Mocks === */ /** === Call and asserts === */ $this->obj->setName($NAME); $this->obj->setLevel($LEVEL); $this->assertEquals($NAME, $this->obj->getName()); $this->assertEquals($LEVEL, $this->obj->getLevel()); }
public function test_level() { /** === Test Data === */ $LEVEL = 16; /** === Call and asserts === */ $this->obj->setLevel($LEVEL); $res = $this->obj->getLevel(); $this->assertEquals($LEVEL, $res); $this->obj->levelIncrease(); $res = $this->obj->getLevel(); $this->assertEquals($LEVEL + 1, $res); $this->obj->levelDecrease(); $res = $this->obj->getLevel(); $this->assertEquals($LEVEL, $res); }