From 503bc06c703e12d3335b51c268699f4e80508ae2 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 24 Jun 2012 12:57:54 -0400 Subject: [PATCH 1/3] Mark fixtures as created if they exist. Fixes #2905 --- lib/Cake/TestSuite/Fixture/CakeFixtureManager.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php index 0e262a917..b98c291d0 100644 --- a/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php +++ b/lib/Cake/TestSuite/Fixture/CakeFixtureManager.php @@ -169,12 +169,15 @@ class CakeFixtureManager { $sources = $db->listSources(); $table = $db->config['prefix'] . $fixture->table; + $exists = in_array($table, $sources); - if ($drop && in_array($table, $sources)) { + if ($drop && $exists) { $fixture->drop($db); $fixture->create($db); - } elseif (!in_array($table, $sources)) { + } elseif (!$exists) { $fixture->create($db); + } else { + $fixture->created[] = $db->configKeyName; } } From 93123a8e6ff45050558143be06891c82e2ca4f5e Mon Sep 17 00:00:00 2001 From: ADmad Date: Tue, 26 Jun 2012 02:37:40 +0530 Subject: [PATCH 2/3] Change "create" to "edit" since said view and layout file already exist in app now. --- app/View/Pages/home.ctp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/View/Pages/home.ctp b/app/View/Pages/home.ctp index 6661e9a62..9a229232c 100644 --- a/app/View/Pages/home.ctp +++ b/app/View/Pages/home.ctp @@ -130,8 +130,8 @@ if (isset($filePresent)):

-To change its layout, create: APP/View/Layouts/default.ctp.
+echo __d('cake_dev', 'To change the content of this page, edit: APP/View/Pages/home.ctp.
+To change its layout, edit: APP/View/Layouts/default.ctp.
You can also add some CSS styles for your pages at: APP/webroot/css.'); ?>

From 476209df03276922b3b9e1ff6c3a0857f13ed64c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Tue, 26 Jun 2012 14:38:07 -0530 Subject: [PATCH 3/3] Changing docs in CakeRequest:accepts() as they were misleading, you are required to pass a correct mimetype and not an alias --- lib/Cake/Network/CakeRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index 2b272b815..106c6a1c9 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -656,7 +656,7 @@ class CakeRequest implements ArrayAccess { * * #### Check for a single type: * - * `$this->request->accepts('json');` + * `$this->request->accepts('application/json');` * * This method will order the returned content types by the preference values indicated * by the client.