public function testRequestHasCorrectDefaultValues() { $request = new Request(); $this->assertFalse($request->isNotification()); $this->assertNull($request->getMethod()); $request->setMethod('test'); $request->setId('1'); $this->assertFalse($request->isNotification()); // explicitly set notification type, but id present // implies: no notification $request->setIsNotification(true); $this->assertFalse($request->isNotification()); $expect = '{"method":"test","params":[],"id":"1"}'; $this->assertEquals($expect, $request->getRequestBody()); }