Commit graph

8435 commits

Author SHA1 Message Date
mark_story
56339e05f3 Adding subcommand to help output.
Subcommands can be shell methods or tasks.  Both should support additional parsers.  Which is not complete yet.
2010-10-13 23:18:23 -04:00
mark_story
278f699fda Updating extract task. 2010-10-13 23:18:23 -04:00
mark_story
41b8affa82 Updating i18n shell to start using new OptionParser class.
Removing more dead attributes from Shell. Making Shell::$name the name used to invoke the shell, not the classname.  This makes it similar to other objects with names.
2010-10-13 23:18:23 -04:00
mark_story
2a2428a694 Updating ApiShell to use ConsoleOptionParser correctly.
Removing old help method.
2010-10-13 23:18:23 -04:00
mark_story
c0d15a420c Changing name of parser attribute. 2010-10-13 23:18:23 -04:00
mark_story
f1ee46749b Fixing failing tests in Schema shell. 2010-10-13 23:18:23 -04:00
mark_story
193721a0eb Fixing notice errors in ShellDispatcher
Removing ShellDispatcher tests that are now inside Shell.
Changing exception type to match the one used in ShellDispatcher.
2010-10-13 23:18:23 -04:00
mark_story
e70089891d Adding some more array_unshift. These fix issues where tasks would receive their name in the argv which is not correct. 2010-10-13 23:18:22 -04:00
mark_story
79d1739778 Adding tests for task methods in runCommand.
Moving startup() call to the dispatcher so nested runCommand calls don't double output the startup content.
2010-10-13 23:18:22 -04:00
mark_story
cea9dadaa2 Fixing ShellDispatcher::parseParams tests to reflect the changes in what they do.
Adding tests for Shell::runCommand().
2010-10-13 23:18:22 -04:00
mark_story
3d351e7760 Dramatically changing how ShellDispatcher and Shell interact.
Shell::runCommand is now responsible for delegating out to tasks and correctly checking methods to run.  ShellDispatcher no longer parses parameters and instead only pulls out the path information that it needs to setup the environment.
2010-10-13 23:18:22 -04:00
mark_story
cd18c8214c Adding Shell::hasMethod and tests for it. 2010-10-13 23:18:22 -04:00
mark_story
18c5a62445 Removing a dead test and adding tests for hasTask 2010-10-13 23:18:22 -04:00
mark_story
830238c2dd Removing $this->AppModel from shells.
Having a partially constructed model in the shell is not useful, and
gives the impression that it will work correctly. Which it doesn't.
2010-10-13 23:18:22 -04:00
mark_story
fbcc9c1fc1 Making Tasks lazy load.
This allows task initialization to be moved out of ShellDispatcher where it does not belong, as tasks are similar to components.  Updating parts of TaskCollection, as the Dispatcher is still required to be passed around.
2010-10-13 23:18:22 -04:00
mark_story
4d199cf8a8 Removing Shell::_loadDbConfig() and Shell::$DbConfig
They did not make sense in Shell as no other core shells even use these
properties/methods.
2010-10-13 23:18:22 -04:00
mark_story
0d522f3bd4 Changing ShellDispatcher to use --help and -h like the option parser does. 2010-10-13 23:18:22 -04:00
mark_story
7f5b5c4fbd Adding exception for unknown option usage. 2010-10-13 23:18:21 -04:00
mark_story
d3c95bc2c4 Adding epilog and description to the generate help. 2010-10-13 23:18:21 -04:00
mark_story
501e63e45d Adding argument help generation in the long help and usage string.
Fixing output of option help, formatting was calculated in 2 places.
2010-10-13 23:18:21 -04:00
mark_story
09adc38b6c Doing some fixes as the longest option + a short would cause incorrect formatting. 2010-10-13 23:18:21 -04:00
mark_story
0eb68226ce Adding ConsoleOptionParser to the AllShells test. 2010-10-13 23:18:21 -04:00
mark_story
733394d584 Adding usage generation for options. 2010-10-13 23:18:21 -04:00
mark_story
cea6cef727 Adding smart defaults for verbose, quiet, and help options.
Adding help formatting for options.
2010-10-13 23:18:21 -04:00
mark_story
a3259743f7 Making error output style have an underline.
Adding a comment style which has blue text.
2010-10-13 23:18:21 -04:00
mark_story
f5ad54e97e Adding required argument checking. 2010-10-13 23:18:21 -04:00
mark_story
505e59ac66 Adding support for boolean options. 2010-10-13 23:18:21 -04:00
mark_story
3e402e2dfb Adding support for positional arguments.
Adding tests and support for positional arguments. Renaming description
key to help as its shorter.
2010-10-13 23:18:21 -04:00
mark_story
6f1dae208c Adding method skeleton 2010-10-13 23:18:21 -04:00
mark_story
b392f300ba Adding docs about how options work. 2010-10-13 23:18:20 -04:00
mark_story
3b9921a390 Adding support for -abc style combination of short options.
Renaming shortcut to short as its shorter :)
2010-10-13 23:18:20 -04:00
mark_story
01a7fc70b7 Removing dead code. 2010-10-13 23:18:20 -04:00
mark_story
07bda824f0 Adding test for parsing multiple options. 2010-10-13 23:18:20 -04:00
mark_story
2c2c9a38d2 Removing required, and type from option flag as they didn't really make sense to include at this point. Adding support for --foo=bar type parameters. 2010-10-13 23:18:20 -04:00
mark_story
7b1b835bc1 Adding very basic implementation for parsing long and short options. 2010-10-13 23:18:20 -04:00
mark_story
d5d9adb92b Starting to implement options and option parsing. 2010-10-13 23:18:20 -04:00
mark_story
694537933e Adding description() and epilog() to ConsoleOptionParser. Starting to build out addOption. 2010-10-13 23:18:20 -04:00
mark_story
d914c0aaea Adding ConsoleOptionParser and its test. 2010-10-13 23:18:20 -04:00
mark_story
41db1485aa Updating test cases to use new objects.
Preventing ConsoleOutput and ConsoleInput constructors from being run as it causes too many files open exceptions.
2010-10-13 23:18:20 -04:00
mark_story
73ad3043a2 Fixing more console tests to use new internals.
Making TaskCollection pass the stdout, stdin, stderr to Tasks they create.  This allows for more flexible dependency injection and makes testing easier.
2010-10-13 23:18:20 -04:00
mark_story
a3023430c8 Updating test cases to use new Shell internals.
Cleaning up some mocks.
2010-10-13 23:18:19 -04:00
mark_story
7921ef1282 Fixing Shell tests to use ConsoleInput. 2010-10-13 23:18:19 -04:00
mark_story
e816a49a6f Moving ShellDispatcher::getInput() into Shell as a protected method. 2010-10-13 23:18:19 -04:00
mark_story
67f03afa02 Moving ConsoleInput to the correct directory. 2010-10-13 23:18:19 -04:00
mark_story
d64078db2d Adding ConsoleInput for reading stdin. 2010-10-13 23:18:19 -04:00
mark_story
cd8d29ef1c Removing conceal, because its a stupid option. 2010-10-13 23:18:19 -04:00
mark_story
76c6decb52 Updating tests for Shell so they pass with the changes in the Shell internals. 2010-10-13 23:18:19 -04:00
mark_story
131433739e Removing dead test stubs and test methods.
Moving clear() into Shell, it should be a shell method.
Changing shell methods to use ConsoleOutput objects, instead of methods on Dispatcher.
2010-10-13 23:18:19 -04:00
mark_story
a55098b00b Making TaskCollection require a Shell instead of a ShellDispatcher.
This will help reduce the coupling between ShellDispatcher and other objects.
Since ShellDispatcher never directly uses or interacts with TaskCollection, it doesn't make much sense for it to have one.  Instead shells will either get their own, or be passed one in.
2010-10-13 23:18:19 -04:00
mark_story
b6602f1d0d Converting more stderr() use into exceptions. 2010-10-13 23:18:19 -04:00
mark_story
749e9c19d5 Adding success style.
Adding some additional formatting to the default welcome method.
2010-10-13 23:18:19 -04:00
mark_story
b11f2bfb1f Adding ConsoleOutput to the AllShells group. 2010-10-13 23:18:18 -04:00
mark_story
9a6b04d5b3 Removing double header output and adding some pizazz to the command list. 2010-10-13 23:18:18 -04:00
mark_story
7719df72c2 Removing code from ShellDispatcher that is now in CommandList. 2010-10-13 23:18:18 -04:00
mark_story
02c4e00556 Starting to move command list out to a separate class so ShellDispatcher can stop having stderr/stdout connections. 2010-10-13 23:18:18 -04:00
mark_story
317e32f07b Making ShellDispatcher use exceptions instead of returning false and doing other goofy things.
Adding MissingShellMethodException, MissingShellClassException and MissingShellFileException for use with ShellDispatcher.
Removing duplicated tests, and refactoring them into separate tests with expected exceptions.
2010-10-13 23:18:18 -04:00
mark_story
ffbb4e6b45 Integrating ConsoleOutput with ConsoleErrorHandler.
Updating test cases to match new output.
2010-10-13 23:18:18 -04:00
mark_story
ce4fe64a61 Initial integration of ConsoleOutput into cake console tools. 2010-10-13 23:18:18 -04:00
mark_story
5c55c289f7 Adding support for uncoloured output for windows environments without
ansicon.
2010-10-13 23:18:18 -04:00
mark_story
90d5c12b3e Fixing issues with background colours, and adding tests for options. 2010-10-13 23:18:18 -04:00
mark_story
d5b5fbee3b Adding formatting methods for coloured output. 2010-10-13 23:18:18 -04:00
mark_story
aec1770abc Adding style format manipulation methods. 2010-10-13 23:18:18 -04:00
mark_story
7dea9b0dbd Starting to refactor console output into ConsoleOutput. 2010-10-13 23:18:18 -04:00
mark_story
3d65b68f1d Renaming cake.test
Updating AllShells suite.
2010-10-13 23:18:17 -04:00
mark_story
9b8ce2d7fa Updating includes for shell + task includes to point at the new file. 2010-10-13 23:18:17 -04:00
mark_story
0a86b7f208 Moving the ShellDispatcher into is own file. This makes testing easier and will make app/console easier to create. 2010-10-13 23:18:17 -04:00
mark_story
079c55656b Updating doc block for console error handler. 2010-10-13 23:18:17 -04:00
mark_story
517c8949f9 Merge branch '2.0' of github.com:cakephp/cakephp into 2.0 2010-10-13 23:17:50 -04:00
mark_story
0c070f7131 Fixing tests that were failing due to SimpleTest being less sensitive to types than PHPUnit.
Fixing tests that were failing due to XmlHelper being removed in 2.0.
2010-10-13 23:09:55 -04:00
mark_story
f19e3d501c Merge branch '1.3' into integration
Conflicts:
	cake/libs/model/cake_schema.php
	cake/libs/model/datasources/dbo_source.php
	cake/libs/model/model.php
	cake/libs/view/helpers/form.php
	cake/libs/view/view.php
	cake/libs/xml.php
	cake/tests/cases/libs/model/model_delete.test.php
	cake/tests/cases/libs/view/view.test.php
	cake/tests/cases/libs/xml.test.php
2010-10-13 22:30:40 -04:00
mark_story
6529e0e2b4 Making optiongroup elements follow the escape parameter.
Tests added.
Fixes #1191
2010-10-13 21:59:53 -04:00
mark_story
3f2109f3c3 Applying patch from 'dragonfly' to fix issue where FormHelper would always append an argument even if one was supplied.
Test Added
Fixes #1155
2010-10-13 21:36:05 -04:00
Jeremy Harris
692aafbf42 Merge remote branch 'upstream/2.0' into 2.0 2010-10-11 20:12:24 -07:00
mark_story
a0a84d1a8d Changing pattern used to read digest auth data. Allows emails to be used as usernames.
This also adds the realm to the return value of SecurityComponent::parseDigestAuth().  Fixes #1181
2010-10-11 22:35:47 -04:00
Jeremy Harris
137c4f7295 Added backwards compatibility to h()'s second param 2010-10-11 19:26:41 -07:00
mark_story
d56416456c Applying patch from 'Justas Butkus' to DboSource
Fixes issues where reconnect could issue warnings related to
array_merge.  Fixes #1182
2010-10-11 21:52:10 -04:00
Jeremy Harris
b58899cf04 Added 'double' option to Santize::html() to pass double_encode parameter to htmlentities() 2010-10-11 18:25:11 -07:00
Jeremy Harris
c686362de8 Added double_encode paramater to h() 2010-10-11 18:23:05 -07:00
Juan Basso
c95c808f88 Merge with 2.0-xml 2010-10-10 23:21:56 -03:00
ADmad
62161203f2 Fixed issue where FormHelper::radio() and FormHelper::select() with option "multiple"=>"checkbox" would generate tag with invalid "id" attribute if a value was non alphanumeric 2010-10-10 23:16:48 +05:30
Phally
0d86302404 Fixed issue with Set::extract() where conditions containing a space and a slash would fail. Fixes #1185
Signed-off-by: mark_story <mark@mark-story.com>
2010-10-08 23:28:23 -04:00
Phally
0e5613f63d Fixed Set::extract() where single numeric keys (everything not 0) were skipped. Fixes #1175
Signed-off-by: mark_story <mark@mark-story.com>
2010-10-07 20:33:31 -04:00
José Lorenzo Rodríguez
5c025d0a18 More testing over the MediaView class 2010-10-03 23:30:47 -04:30
José Lorenzo Rodríguez
9daab17374 Improving test case for MediaView class 2010-10-03 23:30:02 -04:30
José Lorenzo Rodríguez
018def81f4 Cleaning up the MediaView class 2010-10-03 23:27:22 -04:30
José Lorenzo Rodríguez
a611fd0e6c Merge branch '2.0' of github.com:cakephp/cakephp into 2.0 2010-10-03 19:36:24 -04:30
José Lorenzo Rodríguez
bdade0fe08 Adding the ability to compress the response sent from the MeviaView class 2010-10-03 19:35:48 -04:30
José Lorenzo Rodríguez
cf48ee7ed5 Refactoring MediaView to fully use the response object
Improved the way cache headers are sent for delivered files, now it is possible to set cache for files marked for download
2010-10-03 19:34:37 -04:30
José Lorenzo Rodríguez
bf22928b6a Improving the CakeResponse::cache() method 2010-10-03 19:27:08 -04:30
José Lorenzo Rodríguez
d117300518 Improving feedback for developer in case media view does not find the specified file 2010-10-03 19:05:23 -04:30
José Lorenzo Rodríguez
0ba5023f3a Updating testcase and fixing small bug in last commit 2010-10-03 16:48:07 -04:30
José Lorenzo Rodríguez
6f5ce8a81d Refactoring media view to start using the response object, improving CakeResponse::cache() 2010-10-03 16:40:54 -04:30
mark_story
f847080cbf Changing more php version strings. 2010-10-03 12:46:03 -04:00
mark_story
3ab77017ae Fixing OpenTest license mentions to use MIT License
Fixing PHP versions 4 and 5 to only be PHP5.
2010-10-03 12:31:21 -04:00
mark_story
b908365f9d Changing the @license tag on test files, as tests can now be MIT like
the rest of CakePHP.
2010-10-03 12:27:27 -04:00
mark_story
6cabfcec5b Removing dead tests from SessionHelper test case. 2010-10-03 12:15:01 -04:00
mark_story
36737e6419 Adding documentation for new xml options. Adding a default setting to fix all the E_NOTICE errors triggered in [503b7cf5d7]
Fixes #284
2010-10-02 19:20:43 -04:00
teknoid
503b7cf5d7 Adding slug option to avoid auto-slug of tags. Test included. Addresses #284
Signed-off-by: mark_story <mark@mark-story.com>
2010-10-02 19:16:07 -04:00
mark_story
d83c51cde9 Fixing expiration conditions on CSRF tokens. 2010-10-02 18:27:39 -04:00
mark_story
7f7c202f35 Removing old CSRF token validation checks.
Removing failing test because the feature moved.
Adding tests for expired and wrong keys.
2010-10-02 17:16:40 -04:00
mark_story
ac90916b84 Adding some documentation about token consumption. 2010-10-02 00:22:44 -04:00
mark_story
a10f1478ee Adding support for nonce expiry.
Adding simple time based nonce expiration. This does a simple cleanup on
each request, to remove stale tokens.  Tests added.
2010-10-02 00:20:58 -04:00
mark_story
5c27abd35f Applying patch from 'hashmich' to make jQueryEngine not override the success callback. This allows you to provide a success callback and still get the html insertion when used with the update key.
Tests updated.
Fixes #1158
2010-10-01 22:43:46 -04:00
mark_story
711e736cd3 Adding very minimal and incomplete implementation of csrf consumption.
Tests added for consuming csrf tokens on each request.
2010-10-01 00:13:34 -04:00
mark_story
5e26d282a1 Fixing connection specific schema generation
Fixing missing table errors when reading schema for specific connections.
Tests updated to check that tables not on a connection are never touched.  Fixes #1106
2010-09-30 23:22:57 -04:00
mark_story
d83907a77d Changing order of conditions, to put cheaper ones first.
Also fixes issues on safe_mode servers.
Fixes #1164
2010-09-30 23:03:23 -04:00
mark_story
dc6b33f80e Making tokens persist across 'requests'.
Removing more serialize/unserialize calls.
2010-09-30 00:26:44 -04:00
mark_story
f5ed91137a Adding csrfCheck related properties.
nonces are now being populated into the session.
2010-09-30 00:18:25 -04:00
mark_story
b088daf045 Adding tests for csrf feature separation.
Removing serialize() calls as they didn't really add anything.
2010-09-30 00:06:38 -04:00
mark_story
c573fd0432 Fixing issue where a beforeDelete() could trigger a table truncation.
Moving the exists check below beforeDelete() and behavior->beforeDelete() so any records deleted in the callbacks will not exist when db->delete() is called.  Test updated. Fixes #250
2010-09-29 23:31:41 -04:00
evilbloodydemon
38e128b597 test for #250
Signed-off-by: mark_story <mark@mark-story.com>
2010-09-29 23:06:47 -04:00
mark_story
72a1c959a1 Adding CakeSession::clear() which is primarily useful when testing, and offers an alternative to using CakeSession::destroy() 2010-09-29 23:01:23 -04:00
mark_story
597058bab5 Reordering tests in AllRouting case.
Changing how output buffers are emptied, so that its only done in cli.
2010-09-29 22:42:01 -04:00
José Lorenzo Rodríguez
cff2864ba5 Fixing testcase 2010-09-29 01:14:44 -04:30
José Lorenzo Rodríguez
9d35ea0cbc Upgrading CodeCoverage repoting fo phpunit 3.5 2010-09-29 01:14:14 -04:30
mark_story
b08aba8e86 Adding a missing rollback when validation on an associated record fails, and validate = first. Fixes #1147 2010-09-28 23:37:28 -04:00
mark_story
0761edecfb Making the cake:nocache stripping more relaxed so that if either condition to enable caching is on, tags will be stripped. Tests added. Fixes #1148 2010-09-28 23:03:56 -04:00
mark_story
9992cff96c Adding another test for #250. 2010-09-28 22:26:54 -04:00
José Lorenzo Rodríguez
45a407783e Updating options help 2010-09-28 21:11:43 -04:30
José Lorenzo Rodríguez
4445c24008 Merge remote branch 'origin/2.0' into 2.0-phpunit-upgrade 2010-09-28 20:56:44 -04:30
José Lorenzo Rodríguez
f2b51d2375 Fixing parse error 2010-09-27 23:41:11 -04:30
José Lorenzo Rodríguez
87d5a791c6 Fixing helper tests 2010-09-27 23:40:57 -04:30
José Lorenzo Rodríguez
c3ccf15546 Replacing the use of removed "sharedFixture" and adding custom "fixtureManager" property to CakeTestCase 2010-09-27 23:37:56 -04:30
mark_story
3a14f780b9 Moving parent call to fix fatal errors caused by registry being empty. 2010-09-28 00:03:23 -04:00
José Lorenzo Rodríguez
0eaf437fe4 Merge remote branch 'origin/2.0' into 2.0-phpunit-upgrade 2010-09-27 23:19:47 -04:30
José Lorenzo Rodríguez
2635733aba Merge branch '2.0' into 2.0-phpunit-upgrade 2010-09-27 22:42:10 -04:30
José Lorenzo Rodríguez
ba168d1a72 Initial steps towards migrating to phpunit 3.5 2010-09-27 22:37:23 -04:30
mark_story
500550faef Adding documentation note about AclShell and issues with zend.ze1_compatibilty. Fixes #987 2010-09-26 12:33:15 -04:00
mark_story
06ed3a96a7 Moving the plugin import tests to a separate method.
Adding tests for importing a pluginAppHelper.
Closes #1111
2010-09-26 12:30:12 -04:00
mark_story
0990728385 Adding tests for non latin domains to MemcacheEngine. Closes #1143 2010-09-26 12:04:06 -04:00
mark_story
995a14c140 Making MemcacheEngine understand IPv6 addresses. Fixes #1143 2010-09-26 01:11:19 -04:00
mark_story
6d7f2d37ab Fixing issue where fields with the exact same name as the model would result in incorrect name attributes. Tests added. Fixes #1123 2010-09-26 00:46:51 -04:00
mark_story
237b66d193 Adding support for httpOnly cookies to CookieComponent. Fixes #1127 2010-09-25 23:24:37 -04:00
mark_story
3395f4221e Adding Inflector::reset(). This makes non-isolated test runs possible. Adding inflector to the libs suite. 2010-09-25 23:04:49 -04:00
mark_story
63d23df77a Merge branch 'setup-teardown' into all-tests 2010-09-25 22:34:20 -04:00
mark_story
0222717e33 Merge branch 'all-tests' of github.com:markstory/cakephp into all-tests 2010-09-25 22:34:10 -04:00
mark_story
54fa2e3742 Uncommenting model group in all tests. 2010-09-25 22:33:23 -04:00
José Lorenzo Rodríguez
27dfe2d521 Adding all_model suite to the all_tests one 2010-09-25 22:00:30 -04:30
mark_story
2b1bc99eb5 Fixing failing tests in auth and scaffold.
Fixing more tests that had stray buffers.
2010-09-25 22:27:31 -04:00
José Lorenzo Rodríguez
18b38f61e0 Fixing CakeTestFixture import feature 2010-09-25 21:53:48 -04:30
mark_story
92b57d81ee Moving common setup and teardown functionality in to CakeTestCase.
Removing repeated setup/teardown logic from test cases.
Switching tests to use setup/teardown instead of startTest/endTest.
2010-09-25 21:36:49 -04:00
José Lorenzo Rodríguez
5538529c41 Fixing some issues with tables that were not beign droppend at the end of test suite execution 2010-09-25 19:15:26 -04:30
mark_story
24dd0af601 Adding debug backup for view test. 2010-09-25 10:50:35 -04:00
mark_story
f60a7fb854 Adding all libs to the all tests. 2010-09-25 10:42:20 -04:00
mark_story
843ada240a Removing AppController from ErrorHandler test as it can make testing harder.
Removing broken buffering from tests that trigger errors / exceptions.
Adding a loadHelper() to the test_app layout so the layout always has the required helper.
2010-09-25 10:41:08 -04:00
mark_story
714d8298c4 Fixing all tasks include.
Removing drop table queries that cause other tests to fail.
2010-09-25 01:25:42 -04:00
mark_story
26057c59c4 Fixing issue in DboSource test case where buffer would eat all the output.
Removing dead tests from TestManager test.
2010-09-25 01:13:01 -04:00
mark_story
cd7bc3ff6b Removing disabling of tests from last commit.
Using assertContains instead of assertPattern as its easier to read.
2010-09-25 00:56:46 -04:00
mark_story
d8b39a3818 Changing startTest and endTest to setup and teardown.
Adding an App::build() to reset paths.
2010-09-25 00:47:32 -04:00
mark_story
d7b5e12b85 Removing methods from TestManager and putting them into CakeTestSuite. 2010-09-25 00:16:28 -04:00