Browse Source

Workaround regression in 3.6.

mscherer 7 years ago
parent
commit
5fd2f57ff5
1 changed files with 12 additions and 2 deletions
  1. 12 2
      tests/TestCase/Model/Behavior/PasswordableBehaviorTest.php

+ 12 - 2
tests/TestCase/Model/Behavior/PasswordableBehaviorTest.php

@@ -138,7 +138,12 @@ class PasswordableBehaviorTest extends TestCase {
 		$this->Users->patchEntity($user, $data);
 		$is = $this->Users->save($user);
 		$this->assertTrue((bool)$is);
-		$this->assertEquals(['name', 'id'], $is->visibleProperties());
+		if (version_compare(Configure::version(), '3.6.0', '<')) {
+			$fields = ['name', 'created', 'modified', 'id'];
+		} else {
+			$fields = ['name', 'id'];
+		}
+		$this->assertEquals($fields, $is->visibleProperties());
 
 		$id = $user->id;
 		$user = $this->Users->newEntity();
@@ -150,7 +155,12 @@ class PasswordableBehaviorTest extends TestCase {
 		$this->Users->patchEntity($user, $data);
 		$is = $this->Users->save($user);
 		$this->assertTrue((bool)$is);
-		$this->assertEquals(['id'], $is->visibleProperties());
+		if (version_compare(Configure::version(), '3.6.0', '<')) {
+			$fields = ['id', 'modified'];
+		} else {
+			$fields = ['id'];
+		}
+		$this->assertEquals($fields, $is->visibleProperties());
 	}
 
 	/**