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

testAppendingErrorsWithArraySyntax() public method

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