Browse Source

re-add fixture

Mark Scherer 11 years ago
parent
commit
56a82adfc7
2 changed files with 33 additions and 1 deletions
  1. 32 0
      Test/Fixture/ToolsUserFixture.php
  2. 1 1
      TestSuite/IntegrationTestCase.php

+ 32 - 0
Test/Fixture/ToolsUserFixture.php

@@ -0,0 +1,32 @@
+<?php
+
+/**
+ * ToolsUser Fixture
+ */
+class ToolsUserFixture extends CakeTestFixture {
+
+	/**
+	 * Fields
+	 *
+	 * @var array
+	 */
+	public $fields = [
+		'id' => ['type' => 'integer', 'key' => 'primary'],
+		'name' => ['type' => 'string', 'null' => false],
+		'password' => ['type' => 'string', 'null' => false],
+		'role_id' => ['type' => 'integer', 'null' => true],
+	];
+
+	/**
+	 * Records property
+	 *
+	 * @var array
+	 */
+	public $records = [
+		['id' => 1, 'role_id' => 1, 'password' => '123456', 'name' => 'User 1'],
+		['id' => 2, 'role_id' => 2, 'password' => '123456', 'name' => 'User 2'],
+		['id' => 3, 'role_id' => 1, 'password' => '123456', 'name' => 'User 3'],
+		['id' => 4, 'role_id' => 3, 'password' => '123456', 'name' => 'User 4']
+	];
+
+}

+ 1 - 1
TestSuite/IntegrationTestCase.php

@@ -187,7 +187,7 @@ abstract class IntegrationTestCase extends MyControllerTestCase {
 		$this->_requestSession = $this->controller->Session;
 
 		// Shim result of https://github.com/cakephp/cakephp/pull/5744 for earlier versions
-		if ((float)Configure::version() <= 2.6) {
+		if ((float)Configure::version() < 2.6) {
 			$header = $this->_response->header();
 			if (isset($header['Location']) && $this->_response->statusCode() === 200) {
 				$this->_response->statusCode(302);