<?php

declare(strict_types=1);
namespace Tests\git2\Internal;
use git2\git;
use git2\git_repository_init_options;
use Tests\git2\GitTestCase;

final class AccessorTest extends GitTestCase
{

	public function testAccessors(): void
	{
		git::repository_init_options_init($opts, git_repository_init_options::VERSION);
		$this->assertInstanceOf(git_repository_init_options::class, $opts);

		$this->assertSame(git_repository_init_options::VERSION, $opts->version);
		$opts->version = 2;
		$this->assertSame(2, $opts->version);

		$this->assertNull($opts->description);
		$opts->description = 'hello';
		$this->assertSame('hello', $opts->description);
		$opts->description = null;
		$this->assertNull($opts->description);
	}

}