From 264054d9ef36fb6b355417fb56a3cb1147441a6d Mon Sep 17 00:00:00 2001 From: antograssiot Date: Thu, 11 Sep 2014 14:25:59 +0200 Subject: [PATCH] add regression test for #4563 --- tests/TestCase/ORM/EntityTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/TestCase/ORM/EntityTest.php b/tests/TestCase/ORM/EntityTest.php index 22099400875..0da694b292c 100644 --- a/tests/TestCase/ORM/EntityTest.php +++ b/tests/TestCase/ORM/EntityTest.php @@ -786,6 +786,13 @@ public function testErrors() { $this->assertSame($entity, $entity->errors('foo', 'bar')); $this->assertEquals(['bar'], $entity->errors('foo')); + $this->assertEquals([], $entity->errors('boo')); + $entity['boo'] = [ + 'someting' => 'stupid', + 'and' => false + ]; + $this->assertEquals([], $entity->errors('boo')); + $entity->errors('foo', 'other error'); $this->assertEquals(['other error'], $entity->errors('foo'));