summaryrefslogtreecommitdiff
path: root/vendor/chillerlan/php-settings-container/tests/TestOptionsTrait.php
blob: c8c628b5b5654f24076a770dc4535ec0892198ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
 * Trait TestOptionsTrait
 *
 * @created      28.08.2018
 * @author       smiley <[email protected]>
 * @copyright    2018 smiley
 * @license      MIT
 */

namespace chillerlan\SettingsTest;

use function sha1;

trait TestOptionsTrait{

	protected string $test1 = 'foo';

	protected ?bool $test2 = null;

	protected string $testConstruct;

	protected ?string $test4 = null;

	protected ?string $test5 = null;

	protected ?string $test6 = null;

	protected function TestOptionsTrait():void{
		$this->testConstruct = 'success';
	}

	protected function set_test5($value):void{
		$this->test5 = $value.'_test5';
	}

	protected function get_test6():string{
		return $this->test6 === null
			? 'null'
			: sha1($this->test6);
	}
}