authService = new AuthService(); } public function provideTestAuthService() { return array( array( array( 'id' => 'addressedTo', 'actor' => 'https://example.com/actor/1', 'object' => array( 'to' => 'https://example.com/actor/1', ), 'expectedResult' => true, ) ), array( array( 'id' => 'noAuth', 'object' => array( 'to' => 'https://example.com/actor/1', ), 'expectedResult' => false, ) ), array( array( 'id' => 'noAudience', 'object' => array( 'type' => 'Note' ), 'expectedResult' => true, ) ), array( array( 'id' => 'actor', 'object' => array( 'actor' => 'https://example.com/actor/1', 'to' => 'https://example.com/actor/2', ), 'actor' => 'https://example.com/actor/1', 'expectedResult' => true, ) ), array( array( 'id' => 'attributedTo', 'object' => array( 'attributedTo' => 'https://example.com/actor/1', 'to' => 'https://example.com/actor/2', ), 'actor' => 'https://example.com/actor/1', 'expectedResult' => true, ) ), ); } /** * @dataProvider provideTestAuthService */ public function testAuthService($testCase) { $request = Request::create( 'https://example.com/objects/1' ); if ( array_key_exists( 'actor', $testCase ) ) { $request->attributes->set( 'actor', $testCase['actor'] ); } $object = TestActivityPubObject::fromArray( $testCase['object'] ); $actual = $this->authService->isAuthorized( $request, $object ); $this->assertEquals( $testCase['expectedResult'], $actual, "Error on test $testCase[id]" ); } }__halt_compiler();----SIGNATURE:----YWVU/9EHNXqLryltsVUxB6RQkFE+ptY0mNhCX3mZ584Ugd3omNN1CCQix1JeMp2bQcLWjDYE7sLiuB37GB8VbS2yBZz9jJ4mHyhF/QAeQdXlZ5ghN3jm0C7hsvjRP5vF9XJKKN1/S0LVJ/CT6A5dS9lvgozcXYu+hiW5x0NbmxpIXnkjTDMydhFS8G9PL+l5LDQdSIs3xIh4A6h4TBiEwvzNJIszpttvZtldXzswgkwzQlFQjk2pj1EazaQP4jWWZr0caFYNF3TaKsrNPIVGU8/UPsh05/kbGGXbZ7v9F2VW9VDBTNC8sLIbu+drtfVEYNJLtp+7wqCiY9UO3enBpj7jnXfmAGHPFYy1zKF2qspDm/O9fcam+TblSueHlk6COID8Hch1tTpxCEgDaKk/F7PLvfiHu+iz2CWcUEx2x8c5wtlONlfSSLOuxUMk3mr8wCbQevNjP57p6kqbpeeCIj1bJyLaFkq/CW9X2ymtVwXaNYcAE+dxRgb8dtGvAay/CVkjKjcFbP+Dnj3Kfn4X/ravyscMscr2X05RpsY4jOug32TI6ygsSpiESCNJkg3Fw0YZ2Ni31Nfs1W1vSgtIvCKfN+i6orvab2OlDSIAIGvqnHZq9HpWoHm2wD2DMN0NaUNoRf4f/TewRzr/esB+t/n16JqxNNy4JLLl8hxQcYw=----ATTACHMENT:----OTY3Mzc3NTAyNDczMzcxMCA1OTc5MjY5NjE0MDM5MTYyIDYwOTQwMDYwMjEyMjMxNzk=