. // }}} namespace Plugin\ActivityPub\tests\Objects; use Plugin\ActivityPub\tests\ActivityPubTestCase; class GSPersonTest extends ActivityPubTestCase { // public function testPersonFromJson() // { // static::bootKernel(); // static::loadFixtures(); // // $person = Explorer::getOneFromUri('https://testv3.gnusocial.rocks/actor/42', false); // $ap_person = ActivitypubActor::getByPK(['actor_id' => $person->getId()]); // static::assertSame('https://testv3.gnusocial.rocks/actor/42/inbox.json', $ap_person->getInboxUri()); // static::assertSame('https://testv3.gnusocial.rocks/inbox.json', $ap_person->getInboxSharedUri()); // $person = $ap_person->getActor(); // static::assertSame('https://testv3.gnusocial.rocks/actor/42', $person->getUri()); // static::assertSame(\App\Entity\Actor::PERSON, $person->getType()); // static::assertSame('diogo', $person->getNickname()); // static::assertSame('Diogo Cordeiro', $person->getFullname()); // $public_key = ActivityPubRsa::getByActor($person)->getPublicKey(); // static::assertSame("-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArBB+3ldwA2qC1hQTtIho\n9KYhvvMlPdydn8dA6OlyIQ3Jy57ADt2e144jDSY5RQ3esmzWm2QqsI8rAsZsAraO\nl2+855y7Fw35WH4GBc7PJ6MLAEvMk1YWeS/rttXaDzh2i4n/AXkMuxDjS1IBqw2w\nn0qTz2sdGcBJ+mop6AB9Qt2lseBc5IW040jSnfLEDDIaYgoc5m2yRsjGKItOh3BG\njGHDb6JB9FySToSMGIt0/tE5k06wfvAxtkxX5dfGeKtciBpC2MGT169iyMIOM8DN\nFhSl8mowtV1NJQ7nN692USrmNvSJjqe9ugPCDPPvwQ5A6A61Qrgpz5pav/o5Sz69\nzQIDAQAB\n-----END PUBLIC KEY-----\n", $public_key); // } public function testPersonToJson() { static::loadFixtures(); //$actor = Explorer::getOneFromUri('https://testv3.gnusocial.rocks/actor/42', false); //$actual = Actor::toJson($actor); //static::assertSame(file_get_contents($this->fixtures_path . 'objects/person.jsonld'), $actual); } }