Commit graph

220 commits

Author SHA1 Message Date
mark_story
3d8a955043 Add remove() and insert()
Also add support for multi insert and multi remove.
2012-03-26 22:25:38 -04:00
mark_story
6b69ed269a Extracting duplicate loops. 2012-03-26 22:25:38 -04:00
mark_story
e72127e359 WIP, adding sort() and remove() 2012-03-26 22:25:37 -04:00
mark_story
31181f58d6 Add attribute pattern matching. 2012-03-26 22:25:37 -04:00
mark_story
cbfa938303 Fix muliple attribute conditions. 2012-03-26 22:25:37 -04:00
mark_story
8ad4e66eba Making attributes work with any selector type.
Attributes work with all base selectors.
2012-03-26 22:25:37 -04:00
mark_story
9269a6dcde Added some more operators.
Attribute + {n} is still not working.
2012-03-26 22:25:36 -04:00
mark_story
6c87be97ef Implement presence and equality attributes. 2012-03-26 22:25:36 -04:00
mark_story
e87901ac6d Adding tests for {n} and {s} 2012-03-26 22:25:36 -04:00
mark_story
37181e99a8 Basic path selectors implemented for extract(). 2012-03-26 22:25:36 -04:00
mark_story
b3861c01dc Move numeric() into Set2. 2012-03-26 22:25:36 -04:00
mark_story
1315e0f1a1 Moving filter() into Set2. 2012-03-26 22:25:35 -04:00
mark_story
885d5dfd80 Make contains() non-recursive.
Add a few more tests for contains().
2012-03-26 22:25:35 -04:00
mark_story
d37e10a8a9 Move contains() across.
Fix a few issues in contains() with nested needle values.
2012-03-26 22:25:35 -04:00
mark_story
ad65098348 Move normalize() into Set2.
Dropping the ability to 'normalize' string data.
2012-03-26 22:25:34 -04:00
mark_story
e736ea3af9 Move merge() into Set2. 2012-03-26 22:25:34 -04:00
mark_story
51f45c0f28 Moving flatten() across.
It is no longer recursive either.
2012-03-26 22:25:34 -04:00
mark_story
51e3ee0425 Adding dimensions() and maxDimensions()
Splitting the Set::countDim() into two methods.  This creates a simpler
API, as each method only does one job, and only has one argument.  Also
replacing recursion with iteration.
2012-03-26 22:25:34 -04:00
mark_story
328513d35e Start Set2. 2012-03-26 22:25:33 -04:00
mark_story
6b045318d8 Merge branch '2.1' into 2.2 2012-03-26 22:24:30 -04:00
mark_story
b3d886fe82 Fix Set::insert() not overwriting values.
Set::insert() failed to overwrite values that were previously
defined as strings.  Remove test in SessionComponentTest that was
ensuring this bug stuck around.

Fixes #2722
2012-03-26 21:50:53 -04:00
Thomas Ploch
fda065101b Fixed test cases for successful being built on travis. 2012-03-24 21:32:31 +01:00
Ceeram
d748fc7451 Merge branch '2.1' into 2.2 2012-03-23 16:32:04 +01:00
Kyle Robinson Young
90e7afbdc7 Correct parameter order of assertEquals and assertNotEquals 2012-03-22 23:37:12 -07:00
Ceeram
c9528b8446 Merge branch '2.1' into 2.2 2012-03-21 11:19:08 +01:00
mark_story
edd54e4ddf Ignore the remaining errors.
They are just part of the test to compare objects + arrays.
No need to cause standards errors.
2012-03-19 21:38:51 -04:00
Ceeram
c38419e33a Fixing test, some 5.2 installs do not have function to read mime 2012-03-19 09:52:09 +01:00
mark_story
67698248ca Fix some coding standards errors. 2012-03-18 21:48:50 -04:00
dogmatic69
d3a44811ce adding test and fix for hightlighting tags, old bug 2111 for 1.3 but its the same issue. This should make more options possible 2012-03-16 21:20:27 +00:00
Rachman Chavik
079ae8265c Set::expand as implemented by jeremyharris 2012-03-15 20:07:49 +07:00
mark_story
1efee89169 Fix most coding standards issues in Test/Case/Utility 2012-03-13 22:59:20 -04:00
Rachman Chavik
beb0474d67 tests for regression in Set::sort(), re: #2673 2012-03-13 12:44:11 +07:00
Juan Basso
3b1bd90ad6 Updated copyright to 2012. 2012-03-12 22:46:07 -04:00
Ceeram
68eeee80d8 Set::sort() now correctly sorts when using {s}.path, fixes #2673 2012-03-12 21:58:24 +01:00
mark_story
7d256d0f7b One more time. 2012-03-10 22:00:16 -05:00
mark_story
81b487159b Try again at fixing the build. 2012-03-10 21:40:38 -05:00
mark_story
2d343070fe Try to fix build. 2012-03-10 21:33:40 -05:00
Majna
32f5b6f191 Fix failing test. 2012-03-07 19:27:23 +01:00
Majna
4543a4cb88 Make Validation class more strict when checking values in list.
Use in_array() with 'strict' param. Affected rules are Validation::inList() and Validation::multiple().
2012-03-07 18:52:48 +01:00
mark_story
7665f369fa Merge branch '2.1-type-hinting-corrections' into 2.1 2012-02-25 20:07:18 -05:00
euromark
973dce916a php5 corrections 2012-02-25 19:46:07 -05:00
Kyle Robinson Young
4176e59e52 Typo fixes in tests 2012-02-23 15:29:53 -08:00
dogmatic69
2787052bdd adding a truncate test for a url as explained in #2610 2012-02-23 11:17:58 +00:00
Kyle Robinson Young
22582aee63 Upgrade legacy uses of App::build() types 2012-02-18 04:31:29 -08:00
Kyle Robinson Young
c4829dc3b8 Use App::RESET instead of true with App::build() 2012-02-18 04:04:54 -08:00
Kyle Robinson Young
45ec5d73c5 Add missing visibility keywords 2012-02-16 23:13:12 -08:00
Majna
c40d132f81 Fix Folder::tree() when excluding dot files or folders.
When 'exclude' param is array('.') files/folders are not skipped. Added test.
2012-02-17 20:46:52 +01:00
Rachman Chavik
d6fd051fb4 changing methods in CakeTime class to static 2012-02-14 09:34:36 +07:00
Rachman Chavik
8074959637 moving TimeHelperTest to CakeTimeTest 2012-02-10 22:26:00 +07:00
Rachman Chavik
59342e0524 moving methods from TextHelperTest to StringTest 2012-02-10 22:26:00 +07:00
Rachman Chavik
cd7a8452a2 renaming NumberHelperTest to CakeNumberTest 2012-02-10 22:25:59 +07:00
ADmad
c0690a3eff Added reponse object as property of View class View::$response. Refactored HtmlHelper::media() a bit. 2012-02-06 20:45:00 +05:30
mark_story
154b001552 Fix tests that fail on windows.
Refs #2148
2012-01-24 21:12:26 -05:00
mark_story
29514b08fb Fix re-numbering of values in exportVar()
Using array_merge resulted in values being re-indexed,
change how arrays are combined to preserve keys.

Fixes #2506
2012-01-24 20:52:43 -05:00
mark_story
df5d9ac3d1 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/Model.php
	lib/Cake/Test/Case/Routing/RouterTest.php
2012-01-20 20:28:15 -05:00
mark_story
69a69d48a2 Add test for Validation::url() + sftp. 2012-01-19 22:04:10 -05:00
AD7six
f1f1ce0db4 allow specifying an explicit root 2012-01-18 13:05:44 +01:00
AD7six
941d503726 documentation clarification 2012-01-10 10:52:07 +01:00
AD7six
a62c5350b3 whitespace 2012-01-10 10:51:06 +01:00
AD7six
d5fdf45e51 add a test for what happens when you nest on a field that doesn't exist 2012-01-10 10:49:17 +01:00
AD7six
3b1dd82603 add tests for set nest method 2012-01-10 10:18:59 +01:00
mark_story
15c7493e39 Merge branch '2.0' into 2.1 2012-01-06 23:02:16 -05:00
mark_story
e649a0516e Fix singularization of 'foes'
Fixes #2424
2012-01-05 21:22:40 -05:00
Jose Lorenzo Rodriguez
35ecbfebde Making the CakeEvent -> ObjectCollection bridge more intelligent, adding tests 2011-12-25 23:17:08 -04:30
ADmad
e077cf8535 Fixing failing test case. 2011-12-22 03:37:04 +05:30
ADmad
bcab3d0cb9 Made default value and behavior of param $exceptions for Folder::tree() identical to same param in Folder::read() 2011-12-22 03:29:21 +05:30
ADmad
389072708a Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Test/Case/Model/ModelReadTest.php
	lib/Cake/Utility/Debugger.php
2011-12-22 03:15:04 +05:30
ADmad
7339640ef2 Fixed files inside dot folder showing up even when hiding dot files/folder in Folder::tree(). Closes #2395 2011-12-22 02:55:24 +05:30
euromark
a41539dfa4 Indentation fix (tab instead of spaces)
Fixes #2398

Conflicts:

	lib/Cake/Test/Case/Console/Command/ShellTest.php

Signed-off-by: mark_story <mark@mark-story.com>
2011-12-20 22:26:43 -05:00
mark_story
2d68e7da1e Fix failing tests.
You can't use finfo on files that don't exist.
2011-12-18 23:26:57 -05:00
mark_story
f959fcefc4 Add File::mime()
Fixes #1051
2011-12-18 23:02:05 -05:00
mark_story
e9779e7126 Fix failing test in Debugger test case. 2011-12-17 22:53:21 -05:00
Kyle Robinson Young
d794084d38 More code standards formatting 2011-12-15 23:00:07 -08:00
Kyle Robinson Young
51f9837db4 Code standards formatting 2011-12-15 22:52:07 -08:00
Ceeram
3f8934634b remove cheating, sort() always returns true 2011-12-15 01:18:11 +01:00
ADmad
01b04314c9 Fixing possible test case failure 2011-12-15 03:20:09 +05:30
ADmad
16d29a8d0e Making Folder::delete() code more PHP5ish 2011-12-15 03:07:17 +05:30
mark_story
07a2a60468 Merge branch '2.0' into 2.1 2011-12-13 22:03:40 -05:00
mark_story
645ef47878 Fix multiple date formats in Validation::date()
Fixes #2364
2011-12-12 20:21:10 -05:00
mark_story
ab5bfdccfd Fix bad merge and failing test. 2011-12-11 23:20:19 -05:00
mark_story
2e8498e166 Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Model/Datasource/Database/Postgres.php
	lib/Cake/Test/Case/Console/TaskCollectionTest.php
	lib/Cake/Test/Case/Model/ModelIntegrationTest.php
	lib/Cake/Test/Case/Utility/ClassRegistryTest.php
	lib/Cake/Utility/ClassRegistry.php
2011-12-11 22:51:40 -05:00
Jose Lorenzo Rodriguez
cf03b33a0d Properly using sort() before asserting values, asserting the result of sort() is cheating :P 2011-12-10 10:38:24 -04:30
Ceeram
1eb55bc201 ensure test pass when files are returned in different order 2011-12-10 14:26:14 +01:00
Kyle Robinson Young
97fbcd1079 Add test case for Folder::tree with hidden files 2011-12-09 21:44:15 -08:00
mark_story
bc8ae11fc1 Fix fatal error with abstract/interface classes
Abstract/Interface classes + ClassRegistry::init() should
raise an exception, not cause fatal errors.

Update CakeSchema to swallow and ignore any exceptions coming from
ClassRegistry.

Fixes #2328
2011-12-07 20:58:01 -05:00
Kyle Robinson Young
1e1c7a036d Code consistency formatting tweaks 2011-12-06 12:52:48 -08:00
Mark Story
a32eabe492 Merge pull request #355 from shama/patch-casing
Consistently setting setUp() and tearDown() on test cases
2011-12-05 11:44:15 -08:00
Ceeram
3b8990ffca Fix other failing test by 1 second difference 2011-12-05 17:13:22 +01:00
Ceeram
09a623e07b Fix failing tests by 1 second difference 2011-12-05 17:11:41 +01:00
Kyle Robinson Young
5388237099 Consistently setting setUp() and tearDown() on test cases 2011-12-04 13:27:51 -08:00
mark_story
6d269ce25d Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Config/config.php
	lib/Cake/Console/Command/Task/ModelTask.php
	lib/Cake/Console/Command/TestsuiteShell.php
	lib/Cake/Model/CakeSchema.php
	lib/Cake/Model/Datasource/Database/Sqlite.php
	lib/Cake/Test/Case/Model/ModelTestBase.php
	lib/Cake/Test/Case/Routing/DispatcherTest.php
	lib/Cake/Test/Case/Utility/FileTest.php
	lib/Cake/VERSION.txt
2011-12-03 13:45:28 -05:00
Kyle Robinson Young
94e119fe67 Adhere to code formatting standard 2011-11-30 23:21:31 -08:00
Kyle Robinson Young
5876744709 Adhering to coding standards 2011-11-30 07:44:11 -08:00
m
fb3d3ca943 Add test for XML.
Test xml with multiple model results
Fixes #2304
2011-11-26 14:43:19 -05:00
mark_story
54aef7216f Add failing test for #2188 2011-11-25 21:19:31 -05:00
ADmad
90b007ef75 Implemented priority based triggering of callbacks for objects in collection 2011-11-17 12:36:54 +05:30
Rachman Chavik
aab8e98531 Configure ClassRegistry in test mode
CR::config accepts 'testing' key to indicate a test run.
When this flag is set, CR::init() will use 'test' datasource,
or append 'test_' prefix to a model's useDbConfig value if
the datasource configured.
2011-11-17 11:31:36 +07:00
mark_story
fa0ec44dfd Merge branch '2.0' into 2.1
Conflicts:
	lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
	lib/Cake/Test/Case/Error/ExceptionRendererTest.php
	lib/Cake/Test/Case/Utility/DebuggerTest.php
	lib/Cake/Test/Case/View/Helper/TextHelperTest.php
2011-11-16 21:31:16 -05:00
Kyle Robinson Young
c97dca1570 Test case compatibility assertIsA() to assertInstanceOf() 2011-11-16 21:07:08 -05:00
Kyle Robinson Young
98f03dc6df Replacing test case compatibility functions 2011-11-16 21:07:08 -05:00