/** * @covers ::__construct * @group Container */ public function testConstruct() { $data = ['email' => '*****@*****.**', 'name' => 'test']; $container = new Validation($this->validator, $data, true); $this->assertEquals($data, $container->getContents()); $this->assertTrue($container->isReadOnly()); }
/** * Creates a new Struct * * @param [] $data * @param boolean $readOnly */ public function __construct(array $data = [], $readOnly = false) { $validator = $this->createValidator(); parent::__construct($validator, $data, $readOnly); }