public function test_isEmailAvailable() { $User = new User(); $User->username = "******"; $User->contact_email = "*****@*****.**"; $User->setPassword("letmein1234"); $this->assertTrue($User->isEmailAvailable("*****@*****.**")); $User->commit(); $this->assertFalse($User->isEmailAvailable("*****@*****.**")); $this->assertFalse($User->isEmailAvailable()); $Base = new Base(); $this->assertFalse($Base->email_available("*****@*****.**")); $this->assertTrue($Base->email_available("*****@*****.**")); $this->assertfalse($Base->email_available()); $Admin = new Admin(); $this->assertFalse($Admin->email_available("*****@*****.**")); $User = new User(); $this->setExpectedException("Exception", "Cannot check if email address is available because no email address was provided"); $this->assertFalse($User->isEmailAvailable()); }