]> git.mxchange.org Git - friendica.git/blobdiff - tests/src/Protocol/ActivityTest.php
Fix PSR-0 for test classes
[friendica.git] / tests / src / Protocol / ActivityTest.php
index f580f17f56cbf0c3b6216eaf43c5232477a86835..edea12fdff61215e6726d0247d3c220e6934d15c 100644 (file)
@@ -1,8 +1,28 @@
 <?php
+/**
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
 
-namespace Friendica\Test\Protocol;
+namespace Friendica\Test\src\Protocol;
 
 use Friendica\Protocol\Activity;
+use Friendica\Protocol\ActivityNamespace;
 use Friendica\Test\MockedTest;
 
 class ActivityTest extends MockedTest
@@ -16,13 +36,13 @@ class ActivityTest extends MockedTest
                                'assert' => true,
                        ],
                        'simple' => [
-                               'haystack' => Activity::OBJ_TAGTERM,
-                               'needle' => Activity::OBJ_TAGTERM,
+                               'haystack' => Activity\ObjectType::TAGTERM,
+                               'needle' => Activity\ObjectType::TAGTERM,
                                'assert' => true,
                        ],
                        'withNamespace' => [
                                'haystack' => 'tagterm',
-                               'needle' => Activity\Namespaces::ACTIVITY_SCHEMA . Activity::OBJ_TAGTERM,
+                               'needle' => ActivityNamespace::ACTIVITY_SCHEMA . Activity\ObjectType::TAGTERM,
                                'assert' => true,
                        ],
                        'invalidSimple' => [
@@ -32,12 +52,12 @@ class ActivityTest extends MockedTest
                        ],
                        'invalidWithOutNamespace' => [
                                'haystack' => 'tagterm',
-                               'needle' => Activity::OBJ_TAGTERM,
+                               'needle' => Activity\ObjectType::TAGTERM,
                                'assert' => false,
                        ],
                        'withSubPath' => [
                                'haystack' => 'tagterm',
-                               'needle' =>  Activity\Namespaces::ACTIVITY_SCHEMA . '/bla/' . Activity::OBJ_TAGTERM,
+                               'needle' => ActivityNamespace::ACTIVITY_SCHEMA . '/bla/' . Activity\ObjectType::TAGTERM,
                                'assert' => true,
                        ],
                ];
@@ -60,6 +80,6 @@ class ActivityTest extends MockedTest
                $activity = new Activity();
 
                $this->assertTrue($activity->isHidden(Activity::LIKE));
-               $this->assertFalse($activity->isHidden(Activity::OBJ_BOOKMARK));
+               $this->assertFalse($activity->isHidden(Activity\ObjectType::BOOKMARK));
        }
 }