public function testIsIdentified() { $identified = [['description' => 'mbox', 'args' => ['mbox' => COMMON_MBOX]], ['description' => 'mbox_sha1sum', 'args' => ['mbox_sha1sum' => COMMON_MBOX_SHA1]], ['description' => 'openid', 'args' => ['openid' => COMMON_OPENID]], ['description' => 'account', 'args' => ['account' => ['homePage' => COMMON_ACCT_HOMEPAGE, 'name' => COMMON_ACCT_NAME]]]]; foreach ($identified as $case) { $obj = new Agent($case['args']); $this->assertTrue($obj->isIdentified(), 'identified ' . $case['description']); } $notIdentified = [['description' => 'empty', 'args' => []], ['description' => 'name only', 'args' => ['name' => 'Test']]]; foreach ($notIdentified as $case) { $obj = new Agent($case['args']); $this->assertFalse($obj->isIdentified(), 'not identified ' . $case['description']); } }