Beispiel #1
0
 /**
  * Test method for the <code>#toJSON()</code> function.
  */
 public function testToJSON()
 {
     $array = Mac::create()->setBadges(3)->setRootParams(array('content-available' => '1'))->setSound('sound.caf')->setTtl(3600)->toJSON();
     $this->assertCount(4, $array);
     $this->assertEquals(3, $array['mac_badges']);
     $this->assertEquals(array('content-available' => '1'), $array['mac_root_params']);
     $this->assertEquals('sound.caf', $array['mac_sound']);
     $this->assertEquals(3600, $array['mac_ttl']);
 }