public function testGetByToken() { $u = new User($this->container); $this->assertNotFalse($u->create(array('username' => 'user1', 'token' => 'random'))); $this->assertNotFalse($u->create(array('username' => 'user2', 'token' => ''))); $this->assertNotEmpty($u->getByToken('random')); $this->assertEmpty($u->getByToken('')); }