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

testAppendingErrorsWithMixedSyntax() public method

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