assertFalse($State->get(SafeMode::class)->isEnabled()); $this->assertFalse($State->get(StrictMode::class)->isEnabled()); $this->assertFalse($State->get(Breaks::class)->isEnabled()); $UpdatedState = $State->mergingWith(new State([SafeMode::enabled()])); $this->assertTrue($UpdatedState->get(SafeMode::class)->isEnabled()); $this->assertFalse($UpdatedState->get(StrictMode::class)->isEnabled()); $this->assertFalse($UpdatedState->get(Breaks::class)->isEnabled()); } /** * @return void * @throws \PHPUnit\Framework\Exception * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function testStateCloneVisibility() { $this->assertInstanceOf(State::class, clone(new State)); } /** * @return void * @throws \PHPUnit\Framework\Exception * @throws \SebastianBergmann\RecursionContext\InvalidArgumentException */ public function testStateFromStateIdentical() { $State = new State; $this->assertSame($State, State::fromState($State)); } }