Commit graph

233 commits

Author SHA1 Message Date
Tigran Gabrielyan
8e818c89b6 Added $prefix generation in core.php for cake bake shell 2012-08-24 22:52:02 -04:00
mark_story
62dd39133b Fix lint errors + comment content. 2012-08-20 16:21:59 -04:00
mark_story
c83e941497 Merge branch 'master' into 2.3 2012-08-15 21:00:49 -04:00
mark_story
73f29069de Fix issue where omitting a base class would break test generation.
Fixes #3115
2012-08-15 20:59:56 -04:00
mark_story
4487673060 Merge branch 'master' into 2.3 2012-08-09 20:43:47 -04:00
mark_story
73b1c0ac1c Fix off by one error.
Fixes #3094
2012-08-03 23:34:44 -04:00
mark_story
d94cdc67fe Merge branch 'master' into 2.3 2012-07-27 22:38:24 -04:00
mark_story
35bf3097cd Fixing missing imports in generated tests.
Fixes #3059
2012-07-23 21:25:55 -04:00
mark_story
3c6b50953b Merge branch 'master' into 2.3
Conflicts:
	lib/Cake/VERSION.txt
2012-07-18 22:12:51 -04:00
euromark
3945c0e6a8 rtim files 2012-07-18 03:55:29 +02:00
mark_story
b7415525c8 Fix missing line breaks.
Fixes #3028
2012-07-11 15:51:07 -04:00
mark_story
3c824b586f Use $this->bootstrap.
$this->boostrap makes the output match the file changed.
2012-06-18 21:38:08 -04:00
AD7six
23c37efc71 Load fixtures from a consistent location
If a test is baked for a plugin - it should by default look for fixtures in the
same plugin, otherwise it creates potentially complex inter-plugin/app
dependencies.
2012-06-14 13:28:35 +02:00
mark_story
5413143178 Don't modify app/Config/bootstrap when running tests. 2012-06-12 22:10:55 -04:00
mark_story
f6b50a948e Small fixes for validation formatting.
* Remove additional out() calls.
* Remove extra punctuation.
* Fix code standards.
* Fix failing test.
2012-06-10 21:57:15 -04:00
Fitorec
1bcb8daf21 Adding case 'datetime' to validation guesses.
In ModelTask->fieldValidation added option "datetime"
2012-06-10 21:56:43 -04:00
Fitorec
c090845117 Fixing coding style. 2012-06-10 21:56:43 -04:00
Fitorec
207b918b59 Removing the case 2012-06-10 21:56:39 -04:00
Fitorec
fa2a75c3f1 Add the numbers format console menus, showing the validation options in 2 columns. 2012-06-10 21:56:30 -04:00
Jelle Henkens
c8e58b50ba Adding cake core message extraction in cake extract 2012-06-07 23:55:36 +01:00
AD7six
33c112b353 doesn'st need to be a verbose level message
other create mesages are output normally
2012-06-07 23:03:53 +02:00
AD7six
488ba9ef85 Make baking a plugin more user friendly.
Changed the text when the plugin already exists to indicate that the task stops
intentionally.

If there are folder errors - report them in the cli.

Choose the last plugin path by default

Modify the app's bootstrap file if it's not being (obviously) loaded already.
This means it is now possible to do:

    Console/cake bake plugin MyPlugin
    Console/cake bake model MyPlugin.MyModel

Previously the above would result in an error (which only if you know), you'd
fix by editing your Config/bootstrap.php file by hand before retrying to bake
your model.
2012-06-07 09:04:02 +02:00
AD7six
d1475b1fd3 initialize $construct variable 2012-06-06 22:24:15 +02:00
AD7six
a5fabcc1dc No startup and teardown for controller tests
and.. no startup/teardown functions unless they are actually going to do more
than just call parent
2012-06-06 21:06:37 +02:00
Jelle Henkens
0e34bd4b1d Suggest current path in bake project if dir is empty 2012-06-03 14:01:03 +01:00
Jelle Henkens
5656461025 Adding overwrite option to the i18n extract task 2012-05-25 17:01:56 +01:00
AD7six
af4a2efc33 allow baking tests for controllers with uses
if a controller has

	public $uses => array('MyPlugin.MyModel')

in their controller - the bake controller task will fail because `$controller->MyPlugin.MyModel`
doesn't exist
2012-05-25 13:09:52 +02:00
Jelle Henkens
f7ce5262b7 Updating mixed @param documentation to seperate list of accepted types 2012-05-21 21:55:10 +01:00
mark_story
9628910c86 Merge branch '2.1' into 2.2 2012-05-12 20:26:36 -04:00
mark_story
8103eae9f1 Make input prompt clearer in extract task.
Make the prompt display the paths that will be scanned.  Hopefully
this makes the shell a bit easier to use and understand. Also
make the shell not accept 0 paths as a correct answer.

Fixes #2877
2012-05-12 20:26:11 -04:00
Washington
c651bf25d3 remove stub class from controller tests template and mock condition to
make it extends ControllerTestCase
2012-05-11 14:51:56 -03:00
AD7six
6933b31be5 include plugin name in model tests 2012-05-11 00:33:10 +02:00
AD7six
08c3008874 load app classes automatically for plugins
Otherwise baking a test for a plugin model (example) fails
2012-05-10 23:51:09 +02:00
AD7six
3a5e00fa53 var_export dumps null as NULL
correct for that so code standards are met with the results
2012-05-09 23:38:30 +02:00
mark_story
b57489f3f1 Remove duplicate template.
Also remove double creating the home.ctp file.

Fixes #2842
2012-05-02 20:54:50 -04:00
Rachman Chavik
e7fa2a526f remove whitespace at eol 2012-05-01 21:35:48 +07:00
AD7six
9444af2f81 classify the first cli argument for this task
the $type is used to lookup in the $classTypes property what kind of
entity is being baked. if it's underscored, getRealClassName will bail
on it's first condition of "is it in the $classTypes property" producing
mostly useless test stubs for everything except models
2012-04-29 17:20:14 +02:00
Mark Story
f150ebb9cc Merge pull request #623 from dereuromark/2.2-bake-theme-order
Correct order of bake themes so app and plugin precede core ones

Fixes #2825
2012-04-26 09:43:53 -07:00
mark_story
b6de177ffa Merge branch '2.1' into 2.2 2012-04-23 21:50:36 -04:00
euromark
6353558622 bame themes now in correct order: app -> plugin -> default 2012-04-24 02:40:42 +02:00
Rachman Chavik
36275129d7 i18n: consider real path of APP to handle symlinks
When extracting model validation messages, Reflection::getFileName is used
to obtain the the model filename. The returned value is actual physical
path and may differ to what APP is. Adding the realpath(APP) to $paths
variable allows str_replace() to correctly generate the correct value for
$occurences.
2012-04-24 07:29:26 +07:00
mark_story
9f9feec222 Merge branch '2.2-hash' into 2.2
Conflicts:
	lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php
	lib/Cake/View/Helper/FormHelper.php
2012-04-10 21:32:37 -04:00
mark_story
ee7a224639 Fix a code style warning. 2012-03-31 21:40:20 -04:00
Kyle Robinson Young
e2a46f76c7 substr() optimizations 2012-03-28 13:07:26 -07:00
mark_story
19e0d8d946 Switch usage to Hash where possible. 2012-03-26 22:32:53 -04:00
Juan Basso
c754fb2dcb Updated copyright to 2012. 2012-03-12 22:46:46 -04:00
Juan Basso
3b1bd90ad6 Updated copyright to 2012. 2012-03-12 22:46:07 -04:00
mark_story
664b0538b8 Fix more coding standards problems. 2012-03-04 22:49:38 -05:00
mark_story
db8c6b5c78 Fix most of the coding standards issues in Console/ 2012-03-03 18:55:29 -05:00
mark_story
7d51db9e63 Merge branch '2.0' into 2.1 2012-03-03 12:27:22 -05:00