コード例 #1
0
 public function testTypeAndId()
 {
     $identifier = new ResourceIdentifier();
     $this->assertFalse($identifier->hasType());
     $this->assertFalse($identifier->hasId());
     $identifier = ResourceIdentifier::create(self::TYPE, self::ID);
     $this->assertSame(self::TYPE, $identifier->getType());
     $this->assertTrue($identifier->hasType());
     $this->assertSame(self::ID, $identifier->getId());
     $this->assertTrue($identifier->hasId());
     return $identifier;
 }