Commit graph

315 commits

Author SHA1 Message Date
mark_story
9b9e886df6 Fix getMockForModel() using the incorrect datasource.
Because getMockForModel() does not go through the test datasource
injection in ClassRegistry::init() we need to duplicate the basics of
that logic here. Thankfully, we already have a mock so we can do that
datasource switching without reflection. Of course this means there will
be limitations to how/when this will work, but I feel those scenarios
can probably be solved by not using mocks, or by mocking out the
problematic methods. This set of changes makes getMockForModel() work
with secondary datasources, as one would expect it to do, but I'm not
sure it ever did.

Refs #4694
2014-10-12 22:30:22 -04:00
Marc Würth
67ba9cb406 Update all @deprecated annotations
to adhere to the @deprecated <version> <description> format, where version and description are mandatory.
2014-09-02 17:03:22 +02:00
Carl Sutton
8d58d93636 Make the error message better for fixture errors
The stack trace has no details about which fixture is the actual problem.
2014-07-15 13:21:48 +01:00
euromark
974ca851c2 Correct doc blocks according to cs guidelines.
Remove superfluous empty lines.
2014-07-03 15:36:42 +02:00
Mark
1686edf016 Revert "No truncate when drop table." 2014-06-30 14:14:20 +02:00
mark_story
91721244a4 Fix more doc block errors in lib/ 2014-06-27 22:58:34 -04:00
euromark
26fe1265ab Mark App::pluginPath as deprecated and don't use it anymore. 2014-06-24 11:52:29 +02:00
Mark Story
c99c68684b Merge pull request #3646 from nanapi/no-truncate-fixture
Don't truncate test fixtures when the table has been freshly created.
2014-06-18 09:18:24 -04:00
mark_story
d8b0083632 Fix api doc errors in TestSuite/ 2014-06-06 13:57:48 -04:00
akiyan
6d2402fbf6 No truncate when drop table. 2014-06-05 13:37:22 +09:00
mark_story
ab5da2a09f Fix the test suite package doc block errors. 2014-06-05 00:24:01 -04:00
David Yell
140e0bbbd3 Updated the test suite dispatcher to allow use of PHPUnit from Composer
Closes #3479
2014-05-14 09:09:53 +07:00
euromark
4f3578ebda Fix CakeHtmlReporter output for HTML 2014-04-12 13:37:36 +02:00
euromark
0ece694a75 microptimize options and default merge and other string key array merges 2014-04-08 01:25:14 +02:00
Jose Lorenzo Rodriguez
343d3279b9 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Test/Case/Utility/FileTest.php
	lib/Cake/VERSION.txt
2014-04-06 21:50:41 +02:00
euromark
bbe3b6a439 more cs 2014-04-02 03:09:42 +02:00
mark_story
d713ff2c6a Correct docblock.
Refs #3147
2014-03-29 20:19:34 -04:00
Harold Putman
522b5048f8 Expose canUseMemory
This lets Fixture be used to create an actual persistent table with InnoDB engine instead of MEMORY.
2014-03-28 09:24:49 -04:00
mark_story
57b8008dbe Merge branch 'master' into 2.5 2014-03-23 11:01:13 -04:00
mark_story
75fcc7c2f8 Don't use count() in a loop.
Use do while so the count does not happen in a loop statement. This
makes the code linter happier.
2014-03-23 11:00:59 -04:00
mark_story
8acb75425d Merge branch 'master' into 2.5
Conflicts:
	CONTRIBUTING.md
	lib/Cake/Model/Datasource/DboSource.php
2014-03-21 22:55:28 -04:00
mark_story
a801be30d9 Use alternate quoting in assertTags()
When a preg pattern contains no `.` it probably doesn't need quote
anchors.
2014-03-21 22:53:25 -04:00
mark_story
af68f61e7a Make assertTags() run much faster.
Generating the various permutations a priori is incredibly expensive
with sets of attributes. Using nested loops that look for matches is
more efficient.

Add replacments for `.*` and `.+` in preg:/ prefixed attribute matchers
so they do not greedily eat all content. This also requires that preg:/
based attribute matchers *must* be quoted.

Fixes #3072
2014-03-21 22:52:52 -04:00
mark_story
a827b96804 Clean up doc blocks for assertTags. 2014-03-21 22:52:52 -04:00
euromark
97c148a170 Correct typo 2014-03-19 12:47:31 +01:00
Tounu
482b90e6b1 Php cs fixed 2014-03-11 21:16:30 +01:00
Tounu
e4c47f87dd Creation of a method to parse fixture path
Creation of `_parseFixturePath`
2014-03-11 20:55:46 +01:00
Tounu
316fd50443 Allow sub-directories for Fixture folder
Allow sub-directories for Test/Fixture folder (for app. and plugin.)
The directory separator is '/'.
A file ``MyClassFixture.php` in the folder `Fixture/MyFolder` will be included like this :
`'app.MyFolder/my_class'`
2014-03-11 20:12:52 +01:00
mark_story
a965903777 Merge branch 'master' into 2.5 2014-02-17 10:51:32 -05:00
mark_story
070b165527 Mark compatibility shims as deprecated.
Fixes #2845
2014-02-17 10:29:03 -05:00
mark_story
2c5d96e916 Merge branch 'master' into 2.5
Conflicts:
	lib/Cake/Model/Datasource/DboSource.php
2014-02-16 14:24:19 -05:00
mark_story
a5d50da040 Remove dead and unused code. 2014-02-11 16:38:24 -05:00
mark_story
75dd2ff1fb Merge branch 'master' into 2.5 2014-01-16 15:20:40 -05:00
euromark
ecfd64c082 adding test 2014-01-06 21:07:00 +01:00
euromark
865ca7acd6 wording 2014-01-06 20:43:30 +01:00
euromark
1201887ad1 Clearer error message 2014-01-06 20:42:17 +01:00
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