/** * @test */ public function it_returns_new_instance_with_updated_version() { $newCommand = $this->command->withVersion(2); $this->assertNotSame($this->command, $newCommand); $this->assertEquals(1, $this->command->version()); $this->assertEquals(2, $newCommand->version()); }