From 99a04865e81ca354e77c61f8ce867ec85ea4e491 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Thu, 26 Dec 2013 15:01:05 -0500 Subject: [PATCH] Fixed existing tests Just some small tweaks to get all of the tests passing again. Functionality changed and the tests were not kept up to date. --- tests/classes/DateTest.php | 1 + tests/classes/StringTest.php | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/classes/DateTest.php b/tests/classes/DateTest.php index 3983f37..5ca7457 100644 --- a/tests/classes/DateTest.php +++ b/tests/classes/DateTest.php @@ -1,6 +1,7 @@ assertEquals(strlen(String::random()), 8); $this->assertEquals(strlen(String::random(16)), 16); - $this->assertEquals(preg_match('/[A-Z0-9]/', String::random(32, true, true)), 1); - $this->assertEquals(preg_match('/[A-Z]/', String::random(32, true, false)), 1); + $this->assertEquals(preg_match('/[a-z0-9]/', String::random(32, true, true)), 1); + $this->assertEquals(preg_match('/[a-z]/', String::random(32, true, false)), 1); $this->assertEquals(preg_match('/[0-9]/', String::random(32, false, true)), 1); $this->assertEquals(preg_match('/[0-9]/', String::random(32, true, false)), 0); - $this->assertEquals(preg_match('/[A-Z]/', String::random(32, false, true)), 0); - $this->assertEquals(preg_match('/[A-Z0-9]/', String::random(32, false, false)), 0); + $this->assertEquals(preg_match('/[a-z]/', String::random(32, false, true)), 0); + $this->assertEquals(preg_match('/[a-z0-9]/', String::random(32, false, false)), 0); } /** @@ -82,7 +85,7 @@ class StringTest extends PHPUnit_Framework_TestCase public function providerTruncate() { return array( - array('foo bar', 3, true, 'foo...'), + array('foo bar', 3, true, 'foo…'), array('foo bar', 3, false, 'foo...'), array('foo bar', 7, true, 'foo bar'), array('foo bar', 8, true, 'foo bar'),