getUserWithEmail('thisshouldntexist'); $this->assertNull($user); $user = $users->createRow(); $user->test = 1; $user->username = 'usernametest'; $user->openid = 'http://example.com'; $user->accepted_eula = 1; $user->firstname = 'firstnametest'; $user->lastname = 'lastnametest'; $user->email = 'usertest@mailinator.com'; $user->role = User::ROLE_REGISTERED; $user->token = ''; $user->save(); $user = $users->getUserWithEmail('usertest@mailinator.com'); $this->assertType('User', $user); $this->assertEquals('usernametest', $user->username); $this->assertEquals('http://example.com', $user->openid); $this->assertEquals(1, $user->accepted_eula); $this->assertEquals('firstnametest', $user->firstname); $this->assertEquals('lastnametest', $user->lastname); $this->assertEquals('usertest@mailinator.com', $user->email); $this->assertEquals(User::ROLE_REGISTERED, $user->role); $this->assertEquals('', $user->token); $user->delete(); $user = $users->getUserWithEmail('thisshouldntexist'); $this->assertNull($user); } }