-
- inc('applauncher/index')); ?>
-
+
+ inc('applauncher/index')); ?>
+
diff --git a/solid/templates/applauncher/index.php b/solid/templates/applauncher/index.php
index e4516af1..c50d7973 100644
--- a/solid/templates/applauncher/index.php
+++ b/solid/templates/applauncher/index.php
@@ -1,10 +1,10 @@
-
- inc('profile/index')); ?>
-
+
+ inc('profile/index')); ?>
+
diff --git a/solid/templates/profile/index.php b/solid/templates/profile/index.php
index 1c4c7b34..e8eb1023 100644
--- a/solid/templates/profile/index.php
+++ b/solid/templates/profile/index.php
@@ -1,14 +1,14 @@
diff --git a/solid/templates/turtle-profile.php b/solid/templates/turtle-profile.php
index 478cb7c6..f052d406 100644
--- a/solid/templates/turtle-profile.php
+++ b/solid/templates/turtle-profile.php
@@ -1,4 +1,4 @@
inc('profile/turtle'));
- // phpcs:disable PSR2.Files.ClosingTag.NotAllowed
-?>
+
+print_unescaped($this->inc('profile/turtle'));
+// phpcs:disable PSR2.Files.ClosingTag.NotAllowed
diff --git a/solid/tests/Integration/AppTest.php b/solid/tests/Integration/AppTest.php
index 6347f963..2f50ce0c 100644
--- a/solid/tests/Integration/AppTest.php
+++ b/solid/tests/Integration/AppTest.php
@@ -5,23 +5,22 @@
use OCP\AppFramework\App;
use Test\TestCase;
-
/**
* This test shows how to make a small Integration Test. Query your class
* directly from the container, only pass in mocks if needed and run your tests
* against the database
*/
class AppTest extends TestCase {
- private $container;
+ private $container;
- public function setUp() {
- parent::setUp();
- $app = new App('solid');
- $this->container = $app->getContainer();
- }
+ public function setUp() {
+ parent::setUp();
+ $app = new App('solid');
+ $this->container = $app->getContainer();
+ }
- public function testAppInstalled() {
- $appManager = $this->container->query('OCP\App\IAppManager');
- $this->assertTrue($appManager->isInstalled('solid'));
- }
+ public function testAppInstalled() {
+ $appManager = $this->container->query('OCP\App\IAppManager');
+ $this->assertTrue($appManager->isInstalled('solid'));
+ }
}
diff --git a/solid/tests/Unit/Controller/PageControllerTest.php b/solid/tests/Unit/Controller/PageControllerTest.php
index 2b488abf..7ecdc8f5 100644
--- a/solid/tests/Unit/Controller/PageControllerTest.php
+++ b/solid/tests/Unit/Controller/PageControllerTest.php
@@ -2,12 +2,9 @@
namespace OCA\Solid\Tests\Unit\Controller;
-use PHPUnit_Framework_TestCase;
-
-use OCP\AppFramework\Http\TemplateResponse;
-
use OCA\Solid\Controller\PageController;
-
+use OCP\AppFramework\Http\TemplateResponse;
+use PHPUnit_Framework_TestCase;
class PageControllerTest extends PHPUnit_Framework_TestCase {
private $controller;
@@ -25,5 +22,4 @@ public function testIndex() {
$this->assertEquals('index', $result->getTemplateName());
$this->assertTrue($result instanceof TemplateResponse);
}
-
}
diff --git a/solid/tests/Unit/JtiReplayDetectorTest.php b/solid/tests/Unit/JtiReplayDetectorTest.php
index 5395a60d..03bf0db2 100644
--- a/solid/tests/Unit/JtiReplayDetectorTest.php
+++ b/solid/tests/Unit/JtiReplayDetectorTest.php
@@ -3,26 +3,23 @@
namespace OCA\Solid;
use DateInterval;
-use OCP\IDBConnection;
+use OCP\DB\IResult;
use OCP\DB\QueryBuilder\IExpressionBuilder;
use OCP\DB\QueryBuilder\IQueryBuilder;
-use OCP\DB\IResult;
+use OCP\IDBConnection;
use PHPUnit\Framework\TestCase;
-class JtiReplayDetectorTest extends TestCase
-{
- public static function setUpBeforeClass(): void
- {
- require_once __DIR__.'/../../lib/JtiReplayDetector.php';
+class JtiReplayDetectorTest extends TestCase {
+ public static function setUpBeforeClass(): void {
+ require_once __DIR__ . '/../../lib/JtiReplayDetector.php';
}
- private function createMocks($result)
- {
+ private function createMocks($result) {
$mockIDBConnection = $this->createMock(IDBConnection::class);
$mockQueryBuilder = $this->createMock(IQueryBuilder::class);
$mockExpr = $this->createMock(IExpressionBuilder::class);
$mockResult = $this->createMock(IResult::class);
-
+
$mockIDBConnection->expects($this->any())
->method('getQueryBuilder')
->willReturn($mockQueryBuilder);
@@ -67,13 +64,12 @@ private function createMocks($result)
return $mockIDBConnection;
}
- public function testJtiDetected(): void
- {
+ public function testJtiDetected(): void {
$dateInterval = new DateInterval('PT90S');
$mockIDBConnection = $this->createMocks(true);
-
+
$detector = new JtiReplayDetector($dateInterval, $mockIDBConnection);
-
+
$mockUUID = 'mockUUID-with-some-more-text';
$mockURI = 'mockURI';
$result = $detector->detect($mockUUID, $mockURI);
@@ -81,18 +77,16 @@ public function testJtiDetected(): void
$this->assertTrue($result);
}
- public function testJtiNotDetected(): void
- {
+ public function testJtiNotDetected(): void {
$dateInterval = new DateInterval('PT90S');
$mockIDBConnection = $this->createMocks(false);
-
+
$detector = new JtiReplayDetector($dateInterval, $mockIDBConnection);
-
+
$mockUUID = 'mockUUID-with-some-more-text';
$mockURI = 'mockURI';
$result = $detector->detect($mockUUID, $mockURI);
$this->assertFalse($result);
}
-
}
diff --git a/solid/tests/bootstrap.php b/solid/tests/bootstrap.php
index 91a9a5b9..b3ead289 100644
--- a/solid/tests/bootstrap.php
+++ b/solid/tests/bootstrap.php
@@ -1,12 +1,12 @@
addValidRoot(OC::$SERVERROOT . '/tests');
@@ -14,8 +14,8 @@
// Fix for "Autoload path not allowed: .../solid/tests/testcase.php"
\OC_App::loadApp('solid');
-if(!class_exists('PHPUnit_Framework_TestCase')) {
- require_once('PHPUnit/Autoload.php');
+if (!class_exists('PHPUnit_Framework_TestCase')) {
+ require_once('PHPUnit/Autoload.php');
}
OC_Hook::clear();