/**
  * @test
  */
 public function it_builds_a_simple_android_device()
 {
     $device = Device::gcm(self::ANDROID_TOKEN, self::UUID);
     $this->assertEquals(self::ANDROID_TOKEN, $device->token);
     $this->assertEquals(self::UUID, $device->uuid);
     $this->assertTrue($device->isGcm());
     $this->assertFalse($device->isApns());
 }
 /**
  * @test
  */
 public function it_builds_a_notification_with_unique_devices()
 {
     $notification = new Notification('title', 'message');
     // Should be added
     $notification->push(Device::gcm('token', 'uuid'));
     $notification->push(Device::apns('token', 'uuid'));
     // Should not be added as per unique hash rule
     $notification->push(Device::gcm('token', 'uuid'));
     $notification->push(Device::apns('token', 'uuid'));
     $this->assertEquals('title', $notification->title);
     $this->assertEquals('message', $notification->message);
     $this->assertEquals(2, $notification->count());
 }