19 declare(strict_types=1);
27 require_once __DIR__ .
'/ContainerMock.php';
35 $this->assertInstanceOf(Config::class,
new Config($this->mock(Provide::class)));
40 $this->assertFalse((
new Config($this->mock(Provide::class)))->editable());
41 $this->assertTrue((
new Config($this->mock(Provide::class),
true))->editable());
46 $this->assertTrue((
new Config($this->mock(Provide::class)))->allowEditing()->editable());
51 $readonly = $this->mock(Provide::class);
52 $provide = $this->mockMethod(Provide::class,
'allowEditing', [], $readonly);
53 $this->assertSame($readonly, (
new Config($provide))->allowEditing()->legalDocuments());
58 $provide = $this->mockMethod(Provide::class,
'allowEditing', [], $this->mock(Provide::class), self::never());
59 $this->assertSame($provide, (
new Config($provide))->legalDocuments());
testNonEditableLegalDocuments()
testEditableLegalDocuments()