Commit Graph

24 Commits

Author SHA1 Message Date
shadlaws
126727b4f2 #1955 - Make unit test photos unique.
- Added test::random_unique_photo and test::random_unique_photo_unsaved to uniquify test photos.
- Uniquified the black dot of test.jpg by coloring it with the six-digit hex code already used to name the random photos (e.g. "name_a48801.jpg").
- Modified four tests in Item_Model_Test that check photo file contents to use new functions to guarantee uniqueness.
2013-01-24 15:56:13 +01:00
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Bharat Mediratta
d04080c7be Follow-on to 94b26e506c - make the new legal_file
functions more robust when passed an unknown extension.  Fixes Item_Model_Test.
2013-01-17 15:05:46 -05:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Bharat Mediratta
cbd04e1ae0 Move random::string() to be test::random_string() and have it return a
random string of any length.  Also introduce test::lorem_ipsum() and
use that in places where we want strings of words.  Fixes #1713.
2011-04-25 23:26:43 -07:00
Bharat Mediratta
423daa52d5 Update copyright to 2011. 2011-01-21 23:01:06 -08:00
Bharat Mediratta
cd48b89f31 Consolidate all the random code into a random helper that offers:
random::hash()
  random::string()
  random::percent()
  random::int()

So that we don't have lots of different ways to get random values all
over the code.  Follow-on to #1527.
2010-12-15 14:57:00 -08:00
Bharat Mediratta
45c63f4d11 Use mt_rand() instead of rand() since it provides better portability.
Fixes #1527.
2010-12-15 12:48:56 -08:00
Bharat Mediratta
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Bharat Mediratta
8763e475ad Move diff::compare to be test::diff 2010-02-09 15:52:38 -08:00
Bharat Mediratta
61198c22aa Reload items after saving so that we convert their members to strings. 2010-01-22 01:10:52 -08:00
Bharat Mediratta
40b17474bb Add random_group(). 2010-01-21 19:08:29 -08:00
Bharat Mediratta
d3e3bbd713 improve comment. 2010-01-20 23:27:52 -08:00
Bharat Mediratta
2a41e27d49 Add random_tag(). 2010-01-20 21:15:57 -08:00
Bharat Mediratta
76da85a1a0 Extend Gallery_Unit_Test_Case instead of Unit_Test_Case. 2010-01-19 22:38:19 -08:00
Bharat Mediratta
f94fa25e08 Add starts_with(). 2010-01-18 22:51:52 -08:00
Bharat Mediratta
f492436317 Add random_name(). 2010-01-18 13:03:59 -08:00
Bharat Mediratta
dd5f08b703 Create xxx_unsaved() versions for the case where you want to tinker with the item before it gets saved. 2010-01-17 20:06:28 -08:00
Bharat Mediratta
c9fd8d751d Add random_photo() 2010-01-17 19:57:24 -08:00
Bharat Mediratta
53a17e3444 Add album title in random_album(). 2010-01-17 19:26:22 -08:00
Bharat Mediratta
c13d5c3513 Helper class for common test methods (like creating albums, photos,
etc).
2010-01-17 19:24:48 -08:00
Bharat Mediratta
bdd7c68ede Fix some function definitions (they should be static) 2009-12-22 15:41:47 -08:00
Bharat Mediratta
e94009e90d Add a helper for doing complex string comparisons 2009-12-21 17:26:04 -08:00
Bharat Mediratta
287f79dd72 Updated for K24 2009-12-21 11:30:06 -08:00