Skip to content

Commit

Permalink
Add reuse via Data::make()
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
  • Loading branch information
crynobone committed Feb 19, 2020
1 parent 1e4f87c commit 99f1b2f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/Unit/DataTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ public function it_can_create_a_simple_data()
$this->assertSame("data: \"ping\"\n\n", (string) $data);
}

/** @test */
public function it_can_reuse_existing_data()
{
$data = new Data('ping');

$this->assertSame(Data::make($data), $data);
}

/** @test */
public function it_can_create_a_simple_data_using_array()
{
Expand Down

0 comments on commit 99f1b2f

Please sign in to comment.