lithium\tests\cases\data\EntityTest::testAppendingErrors PHP Method

testAppendingErrors() public method

public testAppendingErrors ( )
    public function testAppendingErrors()
    {
        $entity = new Entity();
        $expected = array('Something bad happened.', 'Something really bad happened.');
        $entity->errors('foo', $expected[0]);
        $entity->errors('foo', $expected[1]);
        $this->assertCount(1, $entity->errors());
        $this->assertEqual($expected, $entity->errors('foo'));
    }