/**
  * @covers ::apply
  * @covers ::to
  */
 public function test_does_not_throw_exception_when_container_is_read_write()
 {
     // ----------------------------------------------------------------
     // setup your test
     $container = new FactoryListContainer(["hello" => [ContainerIsReadOnly::class, 'newFromVar']]);
     $container->setReadWrite();
     // ----------------------------------------------------------------
     // perform the change
     RequireWriteableContainer::apply()->to($container);
     // ----------------------------------------------------------------
     // test the results
     $this->assertTrue($container->isReadWrite());
 }
 /**
  * @covers ::__construct
  * @covers ::setReadWrite
  * @covers ::isReadOnly
  * @covers ::isReadWrite
  * @covers ::requireReadWrite
  */
 public function testCanPutIntoReadWriteMode()
 {
     // ----------------------------------------------------------------
     // setup your test
     $factories = ['dummy' => new FactoryListContainerTest_Builder()];
     $unit = new FactoryListContainer($factories);
     // ----------------------------------------------------------------
     // perform the change
     $unit->setReadWrite();
     // ----------------------------------------------------------------
     // test the results
     $this->assertFalse($unit->isReadOnly());
     $this->assertTrue($unit->isReadWrite());
 }