setData() public method

Sets JsonStore's manipulated data
public setData ( string | array | stdClass $data )
$data string | array | stdClass
Beispiel #1
0
 public function testSetData()
 {
     $this->assertEquals($this->jsonStore->toArray(), json_decode($this->json, true));
     $new = ['a' => 'b'];
     $this->jsonStore->setData($new);
     $this->assertEquals($this->jsonStore->toArray(), $new);
     $this->assertNotEquals($this->jsonStore->toArray(), json_decode($this->json, true));
 }