Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Friedman <maf675@gmail.com>
  • Loading branch information
iMattPro committed Mar 31, 2023
1 parent 0066d6d commit 6c2e954
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/functional/visibility_test.php
Expand Up @@ -41,12 +41,12 @@ public function test_acp_pages()

// Test password strength on ACP Account settings page
$crawler = self::request('GET', "adm/index.php?i=acp_users&mode=overview&sid=$this->sid");
$this->assertNotContainsLang('PS_WEAK', $crawler->filter('html')->text());
$this->assertStringNotContainsString('Very\u0020Strong\u0020\uD83D\uDE00', $crawler->filter('html')->text());
$form = $crawler->selectButton($this->lang('SUBMIT'))->form();
$data = array('username' => 'admin');
$form->setValues($data);
$crawler = self::submit($form);
$this->assertContainsLang('PS_WEAK', $crawler->filter('html')->text());
$this->assertStringContainsString('Very\u0020Strong\u0020\uD83D\uDE00', $crawler->filter('html')->text());
}

public function test_ucp_pages()
Expand All @@ -55,20 +55,20 @@ public function test_ucp_pages()

// Test password strength on UCP Account settings page
$crawler = self::request('GET', 'ucp.php?i=ucp_profile&mode=reg_details');
$this->assertContainsLang('PS_WEAK', $crawler->filter('html')->text());
$this->assertStringContainsString('Very\u0020Strong\u0020\uD83D\uDE00', $crawler->filter('html')->text());

// Test password strength on UCP registration page
$this->logout();
$crawler = self::request('GET', 'ucp.php?mode=register');
$form = $crawler->selectButton($this->lang('AGREE'))->form();
$crawler = self::submit($form);
$this->assertContainsLang('PS_WEAK', $crawler->filter('html')->text());
$this->assertStringContainsString('Very\u0020Strong\u0020\uD83D\uDE00', $crawler->filter('html')->text());
}

public function test_other_pages()
{
// Test password strength NOT on index page
$crawler = self::request('GET', 'index.php');
$this->assertNotContainsLang('PS_WEAK', $crawler->filter('html')->text());
$this->assertStringNotContainsString('Very\u0020Strong\u0020\uD83D\uDE00', $crawler->filter('html')->text());
}
}

0 comments on commit 6c2e954

Please sign in to comment.