<commit_before><?php


class EmailAddressTest extends SuiteCRM\StateChecker_PHPUnit_Framework_TestCase
{
    public function testEmailAddress()
    {
        //execute the contructor and check for the Object type and  attributes
        $email = new EmailAddress();
        $this->assertInstanceOf('EmailAddress', $email);
        $this->assertInstanceOf('SugarEmailAddress', $email);
        $this->assertInstanceOf('SugarBean', $email);

        $this->assertAttributeEquals('EmailAddresses', 'module_dir', $email);
        $this->assertAttributeEquals('EmailAddresses', 'module_name', $email);
        $this->assertAttributeEquals('EmailAddress', 'object_name', $email);
        $this->assertAttributeEquals('email_addresses', 'table_name', $email);

        $this->assertAttributeEquals(true, 'disable_row_level_security', $email);
    }

    public function testsave()
    {
        $email = new EmailAddress();

        $email->email_address = '<EMAIL>';
        $email->invaid_email = 0;

        $email->save();

        //test for record ID to verify that record is saved
        $this->assertTrue(isset($email->id));
        $this->assertEquals(36, strlen($email->id));

        //mark the record as deleted and verify that this record cannot be retrieved anymore.
        $email->mark_deleted($email->id);
        $result = $email->retrieve($email->id);
        $this->assertEquals(null, $result);
    }
}
<commit_msg>fixing EmailAddressTest<commit_after><?php


class EmailAddressTest extends SuiteCRM\StateChecker_PHPUnit_Framework_TestCase
{
    public function testEmailAddress()
    {
        //execute the contructor and check for the Object type and  attributes
        $email = new EmailAddress();
        $this->assertInstanceOf('EmailAddress', $email);
        $this->assertInstanceOf('SugarEmailAddress', $email);
        $this->assertInstanceOf('SugarBean', $email);

        $this->assertAttributeEquals('EmailAddresses', 'module_dir', $email);
        $this->assertAttributeEquals('EmailAddresses', 'module_name', $email);
        $this->assertAttributeEquals('EmailAddress', 'object_name', $email);
        $this->assertAttributeEquals('email_addresses', 'table_name', $email);

        $this->assertAttributeEquals(true, 'disable_row_level_security', $email);
    }

    public function testsave()
    {
	// save state

        $state = new \SuiteCRM\StateSaver();
        $state->pushTable('email_addresses');
        
        // test 
        
        $email = new EmailAddress();

        $email->email_address = '<EMAIL>';
        $email->invaid_email = 0;

        $email->save();

        //test for record ID to verify that record is saved
        $this->assertTrue(isset($email->id));
        $this->assertEquals(36, strlen($email->id));

        //mark the record as deleted and verify that this record cannot be retrieved anymore.
        $email->mark_deleted($email->id);
        $result = $email->retrieve($email->id);
        $this->assertEquals(null, $result);

        // clean up
        
        $state->popTable('email_addresses');
    }
}

{'fraction_non_alphanumeric': 0.13711507293354944, 'fraction_numerical': 0.0019448946515397082, 'mean_word_length': 3.1091877496671105, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5136382', 'n_tokens_mistral': 857, 'n_tokens_neox': 839, 'n_words': 185}