Commit graph

279 commits

Author SHA1 Message Date
Stephen Young
f0036b3ebc CakeFixtureManager::load now calls CakeTestFixture::truncate 2013-12-07 09:47:06 -05:00
ADmad
dda6080579 Merge branch 'master' into 2.5 2013-11-19 00:27:12 +05:30
Marc Würth
7cfa0116f4 Removed "PHP 5" from file header DocBlocks
This statement does not serve a purpose anymore.
In a long forgotten world it indicated the main version number of PHP which the code in the file was compatible to.
http://pear.php.net/manual/en/standards.sample.php
But since PHP 5.1 and later this is only marginally true.
Thus I propose to remove it from CakePHP.
2013-11-13 22:58:39 +01:00
Kim Egede Jakobsen
18e0dc95dd Remove @return from docblock (for __construct && __destruct methods) 2013-11-11 14:54:48 +01:00
Kim Egede Jakobsen
f0205f53ad Try to make same comments for constructors.
Conflicts:
	lib/Cake/I18n/L10n.php
2013-11-11 11:03:57 +01:00
ADmad
d9ca148499 Merge branch 'master' into 2.5
Conflicts:
	CONTRIBUTING.md
	lib/Cake/Model/Model.php
	lib/Cake/VERSION.txt
2013-10-30 02:34:09 +05:30
Bryan Crowe
a943ea5c34 Add space between classname(s) 2013-10-22 22:59:50 -04:00
mark_story
5a394c379a Merge branch 'master' into 2.5 2013-10-14 22:57:50 -04:00
euromark
1cb24ae537 CS fixes using phpcs-fixer auto-correction. 2013-10-12 01:27:00 +02:00
Jose Lorenzo Rodriguez
df549898ad Merge remote-tracking branch 'origin/2.5' into k-halaburda-master 2013-10-12 01:05:02 +02:00
Bryan Crowe
c1dd0e4393 Changed url to URL where appropriate 2013-10-07 23:17:58 -04:00
mark_story
5e9b22271a Merge branch 'master' into 2.5 2013-09-27 22:26:33 -04:00
euromark
df269ba0ef Cake to CakePHP name 2013-09-27 19:36:43 +02:00
euromark
cbbd3ec6b3 correct doc block 2013-09-20 19:31:16 +02:00
euromark
b6a7cb7c7e Output overall coverage. 2013-09-20 19:15:51 +02:00
euromark
959988cfa1 Remove last yoda conditions as per coding standards guidelines. 2013-09-06 18:36:57 +02:00
AD7six
09cf69c452 Pass Controller:$components config to mocked components
Otherwise there can be significant differences in behavior between using
an unmodifiedcomponent in testAction and using a mock as the config will not be
propogated from the controller
2013-08-19 10:33:16 +00:00
José Lorenzo Rodríguez
a54c92fc0f Merge pull request #1475 from cakephp/feature/2.4-mock-app-model
Make mocking random models easier
2013-08-05 00:22:53 -07:00
ADmad
38b050a711 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Command/ConsoleShell.php
2013-08-04 19:26:55 +05:30
AD7six
ff856b7ebb bark if the model doesn't exist
Getting the following warning:

    ReflectionException: Class Mock_Foo_e187b1d1 does not have a
constructor, so you cannot pass any constructor arguments

Is a much less obvious way of saying "the class you're trying to mock
doesn't exist". Be more explicit
2013-08-03 16:00:34 +00:00
AD7six
46b28aae50 merge config in getMockForModel
Otherwise, to override just one key, it's necessary to set all the other
defaults too
2013-08-03 16:00:04 +00:00
Jose Lorenzo Rodriguez
d218313cf5 Removing legacy code that will not work on current versions of phpunit,
fixes #3955
2013-08-02 12:24:43 +02:00
Christian Winther
227f9aaa88 Merge pull request #1440 from Phally/master-postgres-fails
Adds order to the test models to make the results more predictable.
2013-08-01 02:38:33 -07:00
mark_story
95b74bd9ef Make sure ComponentCollection has the controller dependency.
Add setter method as changing ComponentCollection's constructor now is
not possible. This fixes issues where components that rely on
Collection->getController() in their constructor can work properly.

Fixes #3946
2013-07-30 09:09:52 -04:00
Phally
db1876d837 Adds order to the test models to make the results more predictable.
Even though there was some code in place to prevent results in random
order from PostgreSQL we were still experiencing this with Jenkins
and Travis.

This commit removes the old code that handled this. From now on this
will be handled differently. Every test model will order by its
primary key. You can disable this by changing the order property
of the model to `null`: `$testModel->order = null`.
2013-07-19 22:31:09 +02:00
ADmad
4ded269549 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Controller/Component/Auth/BlowfishAuthenticate.php
	lib/Cake/VERSION.txt
2013-07-07 12:22:12 +05:30
euromark
c989624f80 whitespace coding standards 2013-07-05 14:15:18 +02:00
mark_story
c597855fe4 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Test/Case/Network/CakeRequestTest.php
2013-07-03 14:21:09 -04:00
euromark
a90cb29c0f simplify else cases 2013-07-03 01:14:41 +02:00
euromark
7cb19b97db coding standards and simplification of else cases as well as some minor fixes 2013-07-03 00:52:48 +02:00
mark_story
f09693f6e8 Merge branch 'master' into 2.4 2013-06-29 23:26:26 -04:00
Marc Würth
2609016dfe Changed http links to lighthouse, groups.google and github to https
Because they get redirected anyway and we should follow good practices.
Also in many cases similar URLs were already using https
2013-06-25 22:58:30 +02:00
mark_story
cd3c54bb9d Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/VERSION.txt
2013-06-10 22:12:10 -04:00
euromark
a6f065e7a2 coding standards whitespace and single quote 2013-06-09 17:20:08 +02:00
ADmad
3303a2cda1 Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php
	lib/Cake/Console/Templates/skel/Config/Schema/i18n.php
	lib/Cake/Console/Templates/skel/Config/Schema/sessions.php
	lib/Cake/Console/Templates/skel/Config/acl.ini.php
	lib/Cake/Console/Templates/skel/Config/acl.php
	lib/Cake/Console/Templates/skel/Config/bootstrap.php
	lib/Cake/Console/Templates/skel/Config/core.php
	lib/Cake/Console/Templates/skel/Config/database.php.default
	lib/Cake/Console/Templates/skel/Config/email.php.default
	lib/Cake/Console/Templates/skel/Config/routes.php
	lib/Cake/Console/Templates/skel/Console/Command/AppShell.php
	lib/Cake/Console/Templates/skel/Console/cake.bat
	lib/Cake/Console/Templates/skel/Console/cake.php
	lib/Cake/Console/Templates/skel/Controller/AppController.php
	lib/Cake/Console/Templates/skel/Controller/PagesController.php
	lib/Cake/Console/Templates/skel/Model/AppModel.php
	lib/Cake/Console/Templates/skel/View/Errors/error400.ctp
	lib/Cake/Console/Templates/skel/View/Errors/error500.ctp
	lib/Cake/Console/Templates/skel/View/Helper/AppHelper.php
	lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/default.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/error.ctp
	lib/Cake/Console/Templates/skel/View/Layouts/flash.ctp
	lib/Cake/Console/Templates/skel/View/Pages/home.ctp
	lib/Cake/Console/Templates/skel/index.php
	lib/Cake/Console/Templates/skel/webroot/index.php
	lib/Cake/Console/Templates/skel/webroot/test.php
2013-06-02 18:03:59 +05:30
Marc Würth
4c9f0414cb Improved the DocBlocks and other code cleanup
Fixed @license tag, url comes first
Whitespace and other minor code cleanup
Added some docblocks
2013-05-31 00:11:19 +02:00
ADmad
36c592e72e Merge branch 'master' into 2.4 2013-05-26 11:23:53 +05:30
mark_story
82d57fb8b2 Add mocked components to the enable list of components.
Mocked components should be enabled so they receive callbacks. This
allows more realistic integration tests using testAction(). Stop
disabling the constructor as it causes a number of errors with
components that use components.

Fixes #3842
2013-05-20 22:22:22 -04:00
mark_story
9cdc3927f2 Tidy up variable names.
Variables with _ in them are confusing, try to use clearer names.
2013-05-20 21:52:08 -04:00
mark_story
041c2d289f Merge branch 'master' into 2.4
Conflicts:
	lib/Cake/Console/Shell.php
2013-03-26 20:31:54 -04:00
mark_story
386be52c71 Be compatible with PHPUnit installed with composer.
Doing a class_exists() check is a simple way to check for PHPUnit being
installed via an autoloader. It also keeps things compatible with
a Vendor dir installation.

Fixes #3721
2013-03-22 21:01:20 -04:00
Ceeram
99fba8c601 more coding standards fixes, minor rectaoring of testcase 2013-03-18 11:38:50 +01:00
Ceeram
89100f9476 fix coding standards 2013-03-18 11:12:28 +01:00
mark_story
e97b3acebb Merge branch 'master' into 2.4 2013-03-14 20:54:42 -04:00
Mark Story
6d301394f4 Merge pull request #1183 from cincodenada/patch-1
Fix bug where differing key-ordering in fixtures causes errors.

When a fixtures first and last records differed data should be
inserted correctly.
2013-03-14 17:52:06 -07:00
Joel Bradshaw
12a142d0ca Remove key-ordering sensitivity in fixtures
Previously, the field order was effectively taken from the last record in the fixture, but the values were ordered according to the array_unique call above - primarily determined by the first record in the fixture.  If these two orders differed, values were added under the wrong keys.
2013-03-14 14:17:59 -07:00
pjskeptic
5038e7eb38 Fixed PHPUnit include bug.
Fixed vendor include path bug.
2013-03-12 22:02:55 -04:00
mark_story
026df62a1f Merge branch 'master' into 2.4 2013-03-12 09:41:37 -04:00
mark_story
73310f9bfd Fix dropTables being ignore in some cases.
When autoFixtures = false & dropTables = false, individually loaded
fixtures should not be dropped.

Fixes #3691
2013-03-12 09:34:20 -04:00
mark_story
8209097bc3 Merge branch 'master' into 2.4 2013-03-09 12:40:59 -05:00