<?php

namespace Tests\Unit\Framework\Validator;

use Openguru\OpenCartFramework\Validator\ErrorBag;
use Tests\TestCase;

class ErrorBagTest extends TestCase
{
    public function testFirstOfAll(): void
    {
        $errorBag = new ErrorBag([
            'foo' => ['one', 'two'],
            'bar' => ['three', 'four'],
        ]);

        $expected = [
            'foo' => 'one',
            'bar' => 'three',
        ];

        $this->assertEquals($expected, $errorBag->firstOfAll());
    }
}
