Пример #1
0
 public function testWithValue()
 {
     $this->assertArrayNotHasKey('five', $this->struct);
     $copy = $this->struct->withValue('five', 5);
     $this->assertNotSame($this->struct, $copy);
     $this->assertArrayHasKey('five', $copy);
     // Setting the same values should not copy
     $another = $copy->withValue('five', 5);
     $this->assertSame($copy, $another);
 }