示例#1
0
 public function testId()
 {
     // Create two requests
     $request_one = new Request();
     $request_two = new Request();
     // Make sure the ID's aren't null
     $this->assertNotNull($request_one->id());
     $this->assertNotNull($request_two->id());
     // Make sure that multiple calls yield the same result
     $this->assertSame($request_one->id(), $request_one->id());
     $this->assertSame($request_one->id(), $request_one->id());
     $this->assertSame($request_two->id(), $request_two->id());
     $this->assertSame($request_two->id(), $request_two->id());
     // Make sure the ID's are unique to each request
     $this->assertNotSame($request_one->id(), $request_two->id());
 }