111 Commits

Author SHA1 Message Date
Brad Dutton
96e7f17a67 changes to get tests passing with PHP 8 2021-04-23 14:33:53 -07:00
Brad Dutton
8a5a326386 Merge pull request #1 from trasher/short_tags
Drop short_tags
2020-10-10 20:27:00 -07:00
bwdutton
9686d6876c only one item was deprecated, re-enable full tests 2020-02-01 16:29:40 -08:00
bwdutton
6a686d3b03 switch travis to php 7.0
don't fail on deprecated function warnings
remove debug
2020-02-01 15:14:07 -08:00
Johan Cwiklinski
6746792bdf Drop short_tags 2018-05-19 17:01:37 +02:00
shadlaws
b036b8acc0 Follow-on fix: if tests throw an exception, don't throw another by calling an undefined variable. 2013-03-10 11:27:10 +01:00
Bharat Mediratta
59ea4a6a31 Follow-on fix: count errors as well as test failures. 2013-03-06 17:04:54 -05:00
Bharat Mediratta
f0064643c2 Set exit status to the number of failed tests. This should fix issues with Travis. 2013-03-06 16:45:38 -05:00
Bharat Mediratta
feed100337 Revert "Return "1" to CLI if not all unit tests pass.". We're not successfully
passing back $all_passed because the function doesn't take it by reference.  Which
is my fault because I gave Jozefs bad advice.  But I don't think it's necessary anyway
so I'm going to try a different approach.

This reverts commit 4fe07c6b0a.

Conflicts:
	modules/gallery_unit_test/controllers/gallery_unit_test.php
2013-03-06 16:38:38 -05:00
Bharat Mediratta
d136a035e3 Explicitly print out the exit status to see if I can narrow down failures on Travis. 2013-03-06 16:13:49 -05:00
Jozef Selesi
4fe07c6b0a Return "1" to CLI if not all unit tests pass. 2013-03-04 23:29:47 +01:00
Bharat Mediratta
f72c5a87c8 Follow-on to 9396342250 for #1985 which
was breaking all unit tests.  Use module::install("gallery") instead
of calling gallery_installer::install directly.
2013-01-31 23:45:36 -05:00
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
587284ab38 Move the test time limit code into Unit_Test since some parts of the
code (like ORM_MPTT) mess with the time limit which interferes with
the overall time limit set in Gallery_Unit_Test_Controller.
2010-12-15 11:17:22 -08:00
Bharat Mediratta
1cc3d130bc Set the unit test timeout to 5 minutes 2010-10-25 21:04:40 -07:00
Bharat Mediratta
de4d858dc2 Add in the missing 'error' count. 2010-08-08 14:56:28 -07:00
Bharat Mediratta
5151f0b865 Improve a comment. 2010-06-07 22:18:09 -07: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
c050acf30a Fix lots of warnings that pop up when we're in E_STRICT mode. They're
mostly issues around uninitialized variables, calling non-static
functions in a static context, calling Session functions directly
instead of on its singleton, passing non-variables by reference, and
subclasses not using the same interface as the parent class.
2010-01-31 16:07:41 -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
8a1c17d869 Use the exception itself to print out a nice text message. 2010-01-20 23:14:51 -08:00
Bharat Mediratta
3f3159d25c Guard against missing/empty $description. 2010-01-20 23:05:51 -08:00
Bharat Mediratta
382214f3c1 Move the error page to the expected location for K24. 2010-01-20 23:00:39 -08:00
Bharat Mediratta
2a41e27d49 Add random_tag(). 2010-01-20 21:15:57 -08:00
Bharat Mediratta
66fbbab907 Add assert_array_equal_to_json(). 2010-01-20 00:06:36 -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
c23bf312c4 Our own version of Unit_Test_Case that adds useful functions like
assert_equal_array().
2010-01-19 00:34:48 -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
3ef22d9d1a Add special output support for ORM_Validation_Exception 2010-01-17 18:09:31 -08:00
Bharat Mediratta
f70130b820 Special case output for ORM_Validation_Exceptions 2010-01-17 13:30:06 -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
0c3fd9579f Stop using Kohana::lang. 2009-12-21 12:09:16 -08:00
Bharat Mediratta
287f79dd72 Updated for K24 2009-12-21 11:30:06 -08:00
Bharat Mediratta
4a417708f0 Kohana::show_404() -> throw new Kohana_404_Exception() 2009-11-25 13:51:33 -08:00