ソースを参照

Simplify test namespacing

Mark Scherer 11 年 前
コミット
087c0945c2

+ 2 - 1
composer.json

@@ -27,7 +27,8 @@
 	"autoload-dev": {
 		"psr-4": {
 			"Tools\\Test\\": "tests",
-			"Cake\\Test\\": "vendor/cakephp/cakephp/tests"
+			"Cake\\Test\\": "vendor/cakephp/cakephp/tests",
+			"TestApp\\": "tests/TestApp"
 		}
 	},
 	"support":{

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

@@ -99,7 +99,7 @@ class ConfirmableBehaviorTest extends TestCase {
 			'name' => 'FooBar'
 		);
 		$animal = $this->Articles->patchEntity($animal, $data);
-		$this->assertSame(array('confirm' => array('This field is required')), $animal->errors());
+		$this->assertSame(array('confirm' => array('_required' => 'This field is required')), $animal->errors());
 	}
 
 }

+ 0 - 7
tests/bootstrap.php

@@ -26,13 +26,6 @@ ini_set('intl.default_locale', 'de-DE');
 require ROOT . '/vendor/cakephp/cakephp/src/basics.php';
 require ROOT . '/vendor/autoload.php';
 
-require CAKE . 'Core/ClassLoader.php';
-
-$loader = new Cake\Core\ClassLoader;
-$loader->register();
-
-$loader->addNamespace('TestApp', ROOT . DS . 'tests' . DS . 'TestApp' . DS);
-
 Cake\Core\Configure::write('App', [
 		'namespace' => 'App',
 		'encoding' => 'UTF-8']);