Browse Source

Use more durable assertion.

MySQL has length, SQLite does not :(
mark_story 12 years ago
parent
commit
277acc1b69
1 changed files with 4 additions and 4 deletions
  1. 4 4
      tests/TestCase/View/Form/EntityContextTest.php

+ 4 - 4
tests/TestCase/View/Form/EntityContextTest.php

@@ -146,10 +146,10 @@ class EntityContextTest extends TestCase {
 		$this->assertFalse($context->hasError('title'));
 		$this->assertEquals('string', $context->type('title'));
 		$this->assertEquals([], $context->error('title'));
-		$this->assertEquals(
-			['length' => null, 'precision' => null],
-			$context->attributes('title')
-		);
+
+		$attrs = $context->attributes('title');
+		$this->assertArrayHasKey('length', $attrs);
+		$this->assertArrayHasKey('precision', $attrs);
 	}
 
 /**