diff --git a/tests/RedirectorPageTest.php b/tests/RedirectorPageTest.php index 3a7b5138c..7ff9e7d62 100644 --- a/tests/RedirectorPageTest.php +++ b/tests/RedirectorPageTest.php @@ -18,13 +18,13 @@ class RedirectorPageTest extends FunctionalTest { /* An error message will be shown if you visit it */ $content = $this->get(Director::makeRelative($page1->Link()))->getBody(); - $this->assertContains("A redirector page has been set up without anywhere to redirect to.", $content); + $this->assertContains(_t('RedirectorPage.HASBEENSETUP'), $content); /* This also applies for internal links */ $page2 = $this->objFromFixture('RedirectorPage','badinternal'); $this->assertEquals(Director::baseURL() . 'bad-internal/', $page2->Link()); $content = $this->get(Director::makeRelative($page2->Link()))->getBody(); - $this->assertContains("A redirector page has been set up without anywhere to redirect to.", $content); + $this->assertContains(_t('RedirectorPage.HASBEENSETUP'), $content); } function testReflexiveAndTransitiveInternalRedirectors() { @@ -32,7 +32,7 @@ class RedirectorPageTest extends FunctionalTest { $page = $this->objFromFixture('RedirectorPage','reflexive'); $this->assertEquals(Director::baseURL() . 'reflexive/', $page->Link()); $content = $this->get(Director::makeRelative($page->Link()))->getBody(); - $this->assertContains("A redirector page has been set up without anywhere to redirect to.", $content); + $this->assertContains(_t('RedirectorPage.HASBEENSETUP'), $content); /* Transitive redirectors are those that point to another redirector page. They should send people to the URLSegment * of the destination page - the middle-stop, so to speak. That should redirect to the final destination */ diff --git a/tests/security/SecurityTest.php b/tests/security/SecurityTest.php index 08cac634b..623192914 100644 --- a/tests/security/SecurityTest.php +++ b/tests/security/SecurityTest.php @@ -72,7 +72,7 @@ class SecurityTest extends FunctionalTest { /* THE FIRST 4 TIMES, THE MEMBER SHOULDN'T BE LOCKED OUT */ if($i < 5) { $this->assertNull($member->LockedOutUntil); - $this->assertTrue(false !== stripos($this->loginErrorMessage(), "That doesn't seem to be the right e-mail address or password")); + $this->assertTrue(false !== stripos($this->loginErrorMessage(), _t('Member.ERRORWRONGCRED'))); } /* AFTER THAT THE USER IS LOCKED OUT FOR 15 MINUTES */ @@ -83,7 +83,7 @@ class SecurityTest extends FunctionalTest { } if($i > 5) { - $this->assertTrue(false !== stripos($this->loginErrorMessage(), "Your account has been temporarily disabled")); + $this->assertTrue(false !== stripos($this->loginErrorMessage(), _t('Member.ERRORLOCKEDOUT'))); } } @@ -112,7 +112,7 @@ class SecurityTest extends FunctionalTest { $this->doTestLoginForm('sam@silverstripe.com' , 'incorrectpassword'); $this->doTestLoginForm('sam@silverstripe.com' , 'incorrectpassword'); $this->assertNull($this->session()->inst_get('loggedInAs')); - $this->assertTrue(false !== stripos($this->loginErrorMessage(), "That doesn't seem to be the right e-mail address or password")); + $this->assertTrue(false !== stripos($this->loginErrorMessage(), _t('Member.ERRORWRONGCRED'))); $this->doTestLoginForm('sam@silverstripe.com' , '1nitialPassword'); $this->assertEquals($this->session()->inst_get('loggedInAs'), $member->ID);