浏览代码

Fix tests.

dereuromark 8 年之前
父节点
当前提交
51139ce8f9

+ 1 - 1
src/Model/Behavior/SluggedBehavior.php

@@ -361,7 +361,7 @@ class SluggedBehavior extends Behavior {
 			set_time_limit(max($max, $count / 100));
 		}
 
-		$this->_table->behaviors()->Slugged->config($params, null, false);
+		$this->config($params, null, false);
 		while (($records = $this->_table->find('all', $params)->toArray())) {
 			/** @var \Cake\ORM\Entity $record */
 			foreach ($records as $record) {

+ 1 - 1
tests/TestCase/Controller/Component/CommonComponentTest.php

@@ -29,7 +29,7 @@ class CommonComponentTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 
-		Configure::write('App.namespace', 'TestApp');
+		
 		Configure::write('App.fullBaseUrl', 'http://localhost');
 
 		$this->request = new Request('/my_controller/foo');

+ 1 - 1
tests/TestCase/Controller/ControllerTest.php

@@ -27,7 +27,7 @@ class ControllerTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 
-		Configure::write('App.namespace', 'TestApp');
+
 
 		$this->Controller = new Controller();
 		$this->Controller->startupProcess();

+ 1 - 1
tests/TestCase/Form/ContactFormTest.php

@@ -29,7 +29,7 @@ class ContactFormTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 
-		Configure::write('App.namespace', 'TestApp');
+
 
 		$this->Form = new ContactForm();
 	}

+ 1 - 1
tests/TestCase/Model/Behavior/BitmaskedBehaviorTest.php

@@ -27,7 +27,7 @@ class BitmaskedBehaviorTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 
-		Configure::write('App.namespace', 'TestApp');
+
 
 		$this->Comments = TableRegistry::get('BitmaskedComments');
 		$this->Comments->addBehavior('Tools.Bitmasked', ['mappedField' => 'statuses']);

+ 1 - 1
tests/TestCase/Model/Behavior/JsonableBehaviorTest.php

@@ -27,7 +27,7 @@ class JsonableBehaviorTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 
-		Configure::write('App.namespace', 'TestApp');
+
 
 		$this->Comments = TableRegistry::get('JsonableComments');
 		$this->Comments->addBehavior('Tools.Jsonable', ['fields' => ['details']]);

+ 1 - 1
tests/TestCase/Model/Behavior/PasswordableBehaviorTest.php

@@ -31,7 +31,7 @@ class PasswordableBehaviorTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 
-		Configure::write('App.namespace', 'TestApp');
+
 
 		Configure::delete('Passwordable');
 		Configure::write('Passwordable.auth', 'AuthTest');

+ 1 - 1
tests/TestCase/Model/Behavior/ResetBehaviorTest.php

@@ -30,7 +30,7 @@ class ResetBehaviorTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 
-		Configure::write('App.namespace', 'TestApp');
+
 
 		$this->Table = TableRegistry::get('ResetComments');
 		$this->Table->addBehavior('Tools.Reset');

+ 1 - 1
tests/TestCase/Model/Entity/EntityTest.php

@@ -26,7 +26,7 @@ class EntityTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 
-		Configure::write('App.namespace', 'TestApp');
+
 
 		$this->Users = TableRegistry::get('ToolsUsers');
 	}

+ 1 - 1
tests/TestCase/Model/Table/TableTest.php

@@ -31,7 +31,7 @@ class TableTest extends TestCase {
 	public function setUp() {
 		parent::setUp();
 
-		Configure::write('App.namespace', 'TestApp');
+
 
 		$this->Users = TableRegistry::get('ToolsUsers');