public function testIsImmutable() { $bag = (new FlagBag(''))->withFlag($flag = new MutableFlag('foo', new \stdClass())); $flag->getObject()->foo = 'bar'; $this->assertEquals((new FlagBag(''))->withFlag($flag = new MutableFlag('foo', new \stdClass())), $bag); $this->assertTrue(true, 'Nothing to do.'); }